summaryrefslogtreecommitdiff
path: root/spec/cache
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-07-19 15:56:49 -0700
committerCarlhuda <carlhuda@engineyard.com>2010-07-19 15:56:49 -0700
commite9c300abb3846002306534aa562c26e8e261c3ee (patch)
tree87db8a6c584a95ef3763200e76cb56cab7646152 /spec/cache
parentc26b2c309432bdcc5397ac0d3bac3831c2a30929 (diff)
downloadbundler-e9c300abb3846002306534aa562c26e8e261c3ee.tar.gz
Remove the call to lock from Runtime#initialize
Diffstat (limited to 'spec/cache')
-rw-r--r--spec/cache/gems_spec.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/cache/gems_spec.rb b/spec/cache/gems_spec.rb
index 088a34709d..5f31f45cc2 100644
--- a/spec/cache/gems_spec.rb
+++ b/spec/cache/gems_spec.rb
@@ -49,10 +49,22 @@ describe "bundle cache" do
bundle "install --local"
should_be_installed("rack 1.0.0")
end
+
+ it "creates a lockfile" do
+ cache_gems "rack-1.0.0"
+
+ gemfile <<-G
+ gem "rack"
+ G
+
+ bundle "cache"
+
+ bundled_app("Gemfile.lock").should exist
+ end
end
describe "when there are also git sources" do
- it "still works" do
+ before do
build_git "foo"
system_gems "rack-1.0.0"
@@ -63,7 +75,9 @@ describe "bundle cache" do
end
gem 'rack'
G
+ end
+ it "still works" do
bundle :cache
system_gems []
@@ -71,6 +85,14 @@ describe "bundle cache" do
should_be_installed("rack 1.0.0", "foo 1.0")
end
+
+ it "should not explode if the lockfile is not present" do
+ FileUtils.rm(bundled_app("Gemfile.lock"))
+
+ bundle :cache
+
+ bundled_app("Gemfile.lock").should exist
+ end
end
describe "when previously cached" do