mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
9d82962af3
commit
d7487d6c08
6 changed files with 17 additions and 0 deletions
|
@ -134,6 +134,7 @@ RSpec.describe "bundle add" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "shows error message when gem cannot be found" do
|
it "shows error message when gem cannot be found" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
bundle "add 'werk_it'"
|
bundle "add 'werk_it'"
|
||||||
expect(err).to match("Could not find gem 'werk_it' in")
|
expect(err).to match("Could not find gem 'werk_it' in")
|
||||||
|
|
||||||
|
|
|
@ -524,6 +524,8 @@ RSpec.describe "bundle install with gem sources" do
|
||||||
|
|
||||||
describe "when requesting a quiet install via --quiet" do
|
describe "when requesting a quiet install via --quiet" do
|
||||||
it "should be quiet" do
|
it "should be quiet" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
|
||||||
gemfile <<-G
|
gemfile <<-G
|
||||||
gem 'rack'
|
gem 'rack'
|
||||||
G
|
G
|
||||||
|
|
|
@ -101,6 +101,10 @@ RSpec.describe "post bundle message" do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "with misspelled or non-existent gem name" do
|
describe "with misspelled or non-existent gem name" do
|
||||||
|
before do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
end
|
||||||
|
|
||||||
it "should report a helpful error message", :bundler => "< 3" do
|
it "should report a helpful error message", :bundler => "< 3" do
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "#{file_uri_for(gem_repo1)}"
|
source "#{file_uri_for(gem_repo1)}"
|
||||||
|
|
|
@ -30,6 +30,8 @@ RSpec.describe "bundle install" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "causes a conflict if explicitly requesting a different version" do
|
it "causes a conflict if explicitly requesting a different version" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "#{file_uri_for(gem_repo2)}"
|
source "#{file_uri_for(gem_repo2)}"
|
||||||
gem "rails", "3.0"
|
gem "rails", "3.0"
|
||||||
|
@ -89,6 +91,8 @@ RSpec.describe "bundle install" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "causes a conflict if child dependencies conflict" do
|
it "causes a conflict if child dependencies conflict" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "#{file_uri_for(gem_repo2)}"
|
source "#{file_uri_for(gem_repo2)}"
|
||||||
gem "activemerchant"
|
gem "activemerchant"
|
||||||
|
@ -108,6 +112,8 @@ RSpec.describe "bundle install" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "causes a conflict if a child dependency conflicts with the Gemfile" do
|
it "causes a conflict if a child dependency conflicts with the Gemfile" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "#{file_uri_for(gem_repo2)}"
|
source "#{file_uri_for(gem_repo2)}"
|
||||||
gem "rails_fail"
|
gem "rails_fail"
|
||||||
|
|
|
@ -192,6 +192,8 @@ RSpec.describe "bundle flex_install" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "suggests bundle update when the Gemfile requires different versions than the lock" do
|
it "suggests bundle update when the Gemfile requires different versions than the lock" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
|
||||||
nice_error = <<-E.strip.gsub(/^ {8}/, "")
|
nice_error = <<-E.strip.gsub(/^ {8}/, "")
|
||||||
Bundler could not find compatible versions for gem "rack":
|
Bundler could not find compatible versions for gem "rack":
|
||||||
In snapshot (Gemfile.lock):
|
In snapshot (Gemfile.lock):
|
||||||
|
|
|
@ -31,6 +31,8 @@ RSpec.context "when installing a bundle that includes yanked gems" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "throws the original error when only the Gemfile specifies a gem version that doesn't exist" do
|
it "throws the original error when only the Gemfile specifies a gem version that doesn't exist" do
|
||||||
|
bundle "config set force_ruby_platform true"
|
||||||
|
|
||||||
install_gemfile <<-G
|
install_gemfile <<-G
|
||||||
source "#{file_uri_for(gem_repo4)}"
|
source "#{file_uri_for(gem_repo4)}"
|
||||||
gem "foo", "10.0.0"
|
gem "foo", "10.0.0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue