Skip the examples for bundle exec with gem installation
This commit is contained in:
parent
f61dbb921e
commit
cecd343336
Notes:
git
2025-04-09 13:49:37 +00:00
@ -6,7 +6,7 @@ RSpec.describe "bundle exec" do
|
|||||||
system_gems(system_gems_to_install, :path => default_bundle_path)
|
system_gems(system_gems_to_install, :path => default_bundle_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "works with --gemfile flag" do
|
it "works with --gemfile flag", :ruby_repo do
|
||||||
create_file "CustomGemfile", <<-G
|
create_file "CustomGemfile", <<-G
|
||||||
gem "rack", "1.0.0"
|
gem "rack", "1.0.0"
|
||||||
G
|
G
|
||||||
@ -15,7 +15,7 @@ RSpec.describe "bundle exec" do
|
|||||||
expect(out).to eq("1.0.0")
|
expect(out).to eq("1.0.0")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "activates the correct gem" do
|
it "activates the correct gem", :ruby_repo do
|
||||||
gemfile <<-G
|
gemfile <<-G
|
||||||
gem "rack", "0.9.1"
|
gem "rack", "0.9.1"
|
||||||
G
|
G
|
||||||
@ -24,7 +24,7 @@ RSpec.describe "bundle exec" do
|
|||||||
expect(out).to eq("0.9.1")
|
expect(out).to eq("0.9.1")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "works when the bins are in ~/.bundle" do
|
it "works when the bins are in ~/.bundle", :ruby_repo do
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
gem "rack"
|
gem "rack"
|
||||||
G
|
G
|
||||||
@ -33,7 +33,7 @@ RSpec.describe "bundle exec" do
|
|||||||
expect(out).to eq("1.0.0")
|
expect(out).to eq("1.0.0")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "works when running from a random directory" do
|
it "works when running from a random directory", :ruby_repo do
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
gem "rack"
|
gem "rack"
|
||||||
G
|
G
|
||||||
@ -269,7 +269,7 @@ RSpec.describe "bundle exec" do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "handles gems installed with --without" do
|
it "handles gems installed with --without", :ruby_repo do
|
||||||
install_gemfile <<-G, forgotten_command_line_options(:without => "middleware")
|
install_gemfile <<-G, forgotten_command_line_options(:without => "middleware")
|
||||||
source "#{file_uri_for(gem_repo1)}"
|
source "#{file_uri_for(gem_repo1)}"
|
||||||
gem "rack" # rack 0.9.1 and 1.0 exist
|
gem "rack" # rack 0.9.1 and 1.0 exist
|
||||||
@ -353,7 +353,7 @@ RSpec.describe "bundle exec" do
|
|||||||
expect(err).to include("bundler: exec needs a command to run")
|
expect(err).to include("bundler: exec needs a command to run")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises a helpful error when exec'ing to something outside of the bundle" do
|
it "raises a helpful error when exec'ing to something outside of the bundle", :ruby_repo do
|
||||||
bundle! "config set clean false" # want to keep the rackup binstub
|
bundle! "config set clean false" # want to keep the rackup binstub
|
||||||
install_gemfile! <<-G
|
install_gemfile! <<-G
|
||||||
source "#{file_uri_for(gem_repo1)}"
|
source "#{file_uri_for(gem_repo1)}"
|
||||||
|
@ -823,7 +823,7 @@ G
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "bundle exec" do
|
context "bundle exec", :ruby_repo do
|
||||||
before do
|
before do
|
||||||
ENV["BUNDLER_FORCE_TTY"] = "true"
|
ENV["BUNDLER_FORCE_TTY"] = "true"
|
||||||
system_gems "rack-1.0.0", "rack-0.9.1", :path => default_bundle_path
|
system_gems "rack-1.0.0", "rack-0.9.1", :path => default_bundle_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user