summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoggs <hello@boggs.xyz>2016-07-25 03:57:59 +0800
committerBoggs <hello@boggs.xyz>2016-07-29 11:39:59 +0800
commit54f9823952b4305dc811217556f9450030b5276f (patch)
tree706847c573732c06a980b6fafe4b7adcc4dede53
parent5fc659389b343159e015e3568dd7430acba7937b (diff)
downloadbundler-54f9823952b4305dc811217556f9450030b5276f.tar.gz
Add spec for install message
-rw-r--r--spec/other/trampoline_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/other/trampoline_spec.rb b/spec/other/trampoline_spec.rb
index 98cd5c5afe..8f62cb609a 100644
--- a/spec/other/trampoline_spec.rb
+++ b/spec/other/trampoline_spec.rb
@@ -76,7 +76,7 @@ describe "bundler version trampolining" do
it "guesses & installs the correct bundler version" do
expect(system_gem_path.join("gems", "bundler-1.12.3")).not_to exist
bundle! "--version"
- expect(out).to eq("Bundler version 1.12.3")
+ expect(out).to include("Bundler version 1.12.3")
expect(system_gem_path.join("gems", "bundler-1.12.3")).to exist
end
@@ -89,6 +89,20 @@ If you'd like to update to the current bundler version (#{Bundler::VERSION}) in
The error was:
E
end
+
+ it "displays installing message before install is started" do
+ expect(system_gem_path.join("gems", "bundler-1.12.3")).not_to exist
+ bundle! "--version"
+ expect(out).to include("Installing locked Bundler version = #{ENV["BUNDLER_VERSION"]}")
+ end
+
+ it "doesn't display installing message if locked version is installed" do
+ expect(system_gem_path.join("gems", "bundler-1.12.3")).not_to exist
+ bundle! "--version"
+ expect(system_gem_path.join("gems", "bundler-1.12.3")).to exist
+ bundle! "--version"
+ expect(out).not_to include("Installing locked Bundler version = #{ENV["BUNDLER_VERSION"]}")
+ end
end
context "bundle update --bundler" do