diff options
Diffstat (limited to 'spec/commands/update_spec.rb')
-rw-r--r-- | spec/commands/update_spec.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb index 735d8cd8de..bf5cd32ca1 100644 --- a/spec/commands/update_spec.rb +++ b/spec/commands/update_spec.rb @@ -563,6 +563,40 @@ RSpec.describe "bundle update in more complicated situations" do expect(the_bundle).to include_gem "a 1.1" end end + + context "when the dependency is for a different platform" do + before do + build_repo4 do + build_gem("a", "0.9") {|s| s.platform = "java" } + build_gem("a", "1.1") {|s| s.platform = "java" } + end + + gemfile <<-G + source "file://#{gem_repo4}" + gem "a", platform: :jruby + G + + lockfile <<-L + GEM + remote: file://#{gem_repo4} + specs: + a (0.9-java) + + PLATFORMS + java + + DEPENDENCIES + a + L + + simulate_platform linux + end + + it "is not updated because it is not actually included in the bundle" do + bundle! "update a" + expect(the_bundle).to_not include_gem "a" + end + end end RSpec.describe "bundle update without a Gemfile.lock" do |