summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-01-31 09:01:03 +1100
committerColby Swandale <colby@taplaboratories.com>2017-01-31 09:01:03 +1100
commitb6ab1faf7cf2a388f6c9961da2e14a23083eacb7 (patch)
treec7edf9847b9f250d778845cd91ed9f2690afc58d
parentf903ba891e27e1b18a7a7aebb49a2715c6efff33 (diff)
downloadbundler-b6ab1faf7cf2a388f6c9961da2e14a23083eacb7.tar.gz
fix for bundle show updating gems and spec feedback
-rw-r--r--lib/bundler/cli/show.rb1
-rw-r--r--spec/commands/show_spec.rb10
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 77e845a603..47d4470aec 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -64,6 +64,7 @@ module Bundler
else
definition.resolve_with_cache!
end
+ Bundler.reset!
definition.specs
end
diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb
index 901d8acb7d..fb97319096 100644
--- a/spec/commands/show_spec.rb
+++ b/spec/commands/show_spec.rb
@@ -169,21 +169,23 @@ RSpec.describe "bundle show" do
end
it "doesn't update gems to newer versions" do
- install_gemfile <<-G
+ install_gemfile! <<-G
source "file://#{gem_repo2}"
gem "rails"
G
+ expect(the_bundle).to include_gem("rails 2.3.2")
+
update_repo2 do
build_gem "rails", '3.0.0' do |s|
s.executables = "rails"
end
end
- bundle "show --outdated"
+ bundle! "show --outdated"
- bundle "install"
- expect(the_bundle).to include_gems("rails 2.3.2")
+ bundle! "install"
+ expect(the_bundle).to include_gem("rails 2.3.2")
end
end
end