aboutsummaryrefslogtreecommitdiffstats
path: root/spec/update
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2014-01-24 14:31:06 +0100
committerJosef Šimánek <josef.simanek@gmail.com>2014-01-26 13:18:06 +0100
commitf66b49ebddf4cd20c057c54e594b9758ad29528b (patch)
tree8827c26f2044b10653a4d06c2e3ca477ad77a6b9 /spec/update
parentfc0a620873e107310d588579cded6c6ee9dbe417 (diff)
downloadbundler-f66b49ebddf4cd20c057c54e594b9758ad29528b.tar.gz
Don't blow on bundle update gem when lock is not present.
* rename not_found_message to gem_not_found_message * add lock_not_found_message * add GemfileLockNotFound error with 22 status code
Diffstat (limited to 'spec/update')
-rw-r--r--spec/update/gems_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/update/gems_spec.rb b/spec/update/gems_spec.rb
index e5038884..856e9226 100644
--- a/spec/update/gems_spec.rb
+++ b/spec/update/gems_spec.rb
@@ -187,4 +187,15 @@ describe "bundle update" do
bundle "update"
expect(out).to include("Installing activesupport 3.0 (was 2.3.5)")
end
+
+ it "shows error message when Gemfile.lock is not preset and gem is specified" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "activesupport"
+ G
+
+ bundle "update nonexisting", :exitstatus => true
+ expect(out).to include("This Bundle hasn't been installed yet. Run `bundle install` to update and install the bundled gems.")
+ expect(@exitstatus).to eq(22)
+ end
end