diff options
author | Samuel E. Giddins <segiddins@segiddins.me> | 2015-06-16 18:01:04 -0700 |
---|---|---|
committer | Samuel E. Giddins <segiddins@segiddins.me> | 2015-06-16 18:01:04 -0700 |
commit | be83841026342eed851f37085cba38c0c936a2b0 (patch) | |
tree | f74bd0e575fca4d4362c5eadcbf8f15436143862 /spec/commands/check_spec.rb | |
parent | d3a76ee3023d830417f7e1d3d4e2273d1d96c822 (diff) | |
parent | 1678edeea88266e2f9c0de85f3ec3e2279d1265f (diff) | |
download | bundler-be83841026342eed851f37085cba38c0c936a2b0.tar.gz |
Merge tag 'v1.10.4'
Version 1.10.4
Diffstat (limited to 'spec/commands/check_spec.rb')
-rw-r--r-- | spec/commands/check_spec.rb | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb index 95e77ae799..afc2cef6d9 100644 --- a/spec/commands/check_spec.rb +++ b/spec/commands/check_spec.rb @@ -288,4 +288,61 @@ describe "bundle check" do expect(out).to include("* rack (1.0") end end + + describe "BUNDLED WITH" do + def lock_with(bundler_version = nil) + lock = <<-L + GEM + remote: file:#{gem_repo1}/ + specs: + rack (1.0.0) + + PLATFORMS + #{generic(Gem::Platform.local)} + + DEPENDENCIES + rack + L + + if bundler_version + lock << "\n BUNDLED WITH\n #{bundler_version}\n" + end + + lock + end + + before do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + end + + context "is not present" do + it "does not change the lock" do + lockfile lock_with(nil) + bundle :check + lockfile_should_be lock_with(nil) + end + end + + context "is newer" do + it "does not change the lock but warns" do + lockfile lock_with(Bundler::VERSION.succ) + bundle :check + expect(out).to include("Bundler is older than the version that created the lockfile") + expect(err).to eq("") + lockfile_should_be lock_with(Bundler::VERSION.succ) + end + end + + context "is older" do + it "does not change the lock" do + lockfile lock_with("1.10.1") + bundle :check + lockfile_should_be lock_with("1.10.1") + end + end + end + end |