aboutsummaryrefslogtreecommitdiffstats
path: root/spec/other
diff options
context:
space:
mode:
authorBoggs <hello@boggs.xyz>2016-06-26 22:34:22 +0800
committerBoggs <hello@boggs.xyz>2016-06-28 09:20:35 +0800
commit04cb8658579aa2c7aeb383c21909380d07189ded (patch)
tree46cd57a8ff0dd51a6199c2dd23b3b1da17f005a4 /spec/other
parent961f0414fd4b955c151d8334f41ce9a2239176d8 (diff)
downloadbundler-04cb8658579aa2c7aeb383c21909380d07189ded.tar.gz
Limit warning to `bundle i` and `bundle install`
Reorganize specs Remove whitespace
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/trampoline_spec.rb31
1 files changed, 16 insertions, 15 deletions
diff --git a/spec/other/trampoline_spec.rb b/spec/other/trampoline_spec.rb
index 54be4314..8f73050e 100644
--- a/spec/other/trampoline_spec.rb
+++ b/spec/other/trampoline_spec.rb
@@ -7,21 +7,6 @@ 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|
@@ -149,4 +134,20 @@ The error was:
expect(out).to eq("1.12.0")
end
end
+
+ context "warnings" do
+ before do
+ simulate_bundler_version("1.12.0") do
+ install_gemfile ""
+ end
+ end
+
+ it "warns user if Bundler is outdated and is < 1.13.0.pre.1" do
+ ENV["BUNDLER_VERSION"] = "1.12.0"
+ bundle! "install"
+ 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
+ end
+ end
end