diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb index e4bd98984a5..4526ab59c11 100644 --- a/spec/commands/update_spec.rb +++ b/spec/commands/update_spec.rb @@ -129,6 +129,19 @@ expect(exitstatus).not_to eq(0) if exitstatus end end + + describe "with --source option" do + it "should not update gems not included in the source that happen to have the same name" do + install_gemfile <<-G + source "file://#{gem_repo2}" + gem "activesupport" + G + update_repo2 { build_gem "activesupport", "3.0" } + + bundle "update --source activesupport" + should_not_be_installed "activesupport 3.0" + end + end end describe "bundle update in more complicated situations" do