mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Try make some specs platform independent
https://github.com/bundler/bundler/commit/b5900e57a4
This commit is contained in:
parent
9d82962af3
commit
d7487d6c08
6 changed files with 17 additions and 0 deletions
|
@ -134,6 +134,7 @@ RSpec.describe "bundle add" do
|
|||
end
|
||||
|
||||
it "shows error message when gem cannot be found" do
|
||||
bundle "config set force_ruby_platform true"
|
||||
bundle "add 'werk_it'"
|
||||
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
|
||||
it "should be quiet" do
|
||||
bundle "config set force_ruby_platform true"
|
||||
|
||||
gemfile <<-G
|
||||
gem 'rack'
|
||||
G
|
||||
|
|
|
@ -101,6 +101,10 @@ RSpec.describe "post bundle message" do
|
|||
end
|
||||
|
||||
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
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
|
|
|
@ -30,6 +30,8 @@ RSpec.describe "bundle install" do
|
|||
end
|
||||
|
||||
it "causes a conflict if explicitly requesting a different version" do
|
||||
bundle "config set force_ruby_platform true"
|
||||
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo2)}"
|
||||
gem "rails", "3.0"
|
||||
|
@ -89,6 +91,8 @@ RSpec.describe "bundle install" do
|
|||
end
|
||||
|
||||
it "causes a conflict if child dependencies conflict" do
|
||||
bundle "config set force_ruby_platform true"
|
||||
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo2)}"
|
||||
gem "activemerchant"
|
||||
|
@ -108,6 +112,8 @@ RSpec.describe "bundle install" do
|
|||
end
|
||||
|
||||
it "causes a conflict if a child dependency conflicts with the Gemfile" do
|
||||
bundle "config set force_ruby_platform true"
|
||||
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo2)}"
|
||||
gem "rails_fail"
|
||||
|
|
|
@ -192,6 +192,8 @@ RSpec.describe "bundle flex_install" do
|
|||
end
|
||||
|
||||
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}/, "")
|
||||
Bundler could not find compatible versions for gem "rack":
|
||||
In snapshot (Gemfile.lock):
|
||||
|
|
|
@ -31,6 +31,8 @@ RSpec.context "when installing a bundle that includes yanked gems" do
|
|||
end
|
||||
|
||||
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
|
||||
source "#{file_uri_for(gem_repo4)}"
|
||||
gem "foo", "10.0.0"
|
||||
|
|
Loading…
Add table
Reference in a new issue