aboutsummaryrefslogtreecommitdiffstats
path: root/spec/other
diff options
context:
space:
mode:
authorBoggs <hello.boggs@gmail.com>2016-06-26 15:53:46 +0800
committerBoggs <hello@boggs.xyz>2016-06-28 09:20:35 +0800
commit961f0414fd4b955c151d8334f41ce9a2239176d8 (patch)
tree5722a8b515feb32f66b0091914089ae7d3af7333 /spec/other
parent4d62fefa4de732b635785f66f096d5a5b7a9fffe (diff)
downloadbundler-961f0414fd4b955c151d8334f41ce9a2239176d8.tar.gz
Add warnings for different versions of bundler; add specs
Remove space
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/trampoline_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/other/trampoline_spec.rb b/spec/other/trampoline_spec.rb
index 0d4fe03f..54be4314 100644
--- a/spec/other/trampoline_spec.rb
+++ b/spec/other/trampoline_spec.rb
@@ -7,6 +7,21 @@ describe "bundler version trampolining" do
FileUtils.rm_rf(system_gem_path)
FileUtils.cp_r(base_system_gems, system_gem_path)
end
+ context "warnings" do
+ it "warns user if Bundler is outdated and is < 1.13.0.pre.1" do
+ ENV["BUNDLER_VERSION"] = "1.12.0"
+ bundle! "--version"
+ expect(out).to include(<<-WARN.strip)
+You're running Bundler #{Bundler::VERSION} but this project uses #{ENV["BUNDLER_VERSION"]}. To update, run `bundle update --bundler`.\n
+ WARN
+
+ ENV["BUNDLER_VERSION"] = "1.13.0.pre.1"
+ bundle! "--version"
+ expect(out).not_to include(<<-WARN.strip)
+You're running Bundler #{Bundler::VERSION} but this project uses #{ENV["BUNDLER_VERSION"]}. To update, run `bundle update --bundler`.\n
+ WARN
+ end
+ end
context "version guessing" do
shared_examples_for "guesses" do |version|