aboutsummaryrefslogtreecommitdiffstats
path: root/spec/other/check_spec.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-02-10 22:45:20 -0800
committerCarl Lerche <carllerche@mac.com>2010-02-10 22:45:20 -0800
commit4d849061246156d0c36015fe1ced3d930199a41e (patch)
tree1d4a959a195f14ab2ccb11d8a29f9bf540202e79 /spec/other/check_spec.rb
parent5f5ac21b4161b1638ac196e554439d2aab9799e4 (diff)
downloadbundler-4d849061246156d0c36015fe1ced3d930199a41e.tar.gz
Regenerate .bundle/environment.rb during bundle check
Diffstat (limited to 'spec/other/check_spec.rb')
-rw-r--r--spec/other/check_spec.rb21
1 files changed, 17 insertions, 4 deletions
diff --git a/spec/other/check_spec.rb b/spec/other/check_spec.rb
index 3f9846aa..1ddf555d 100644
--- a/spec/other/check_spec.rb
+++ b/spec/other/check_spec.rb
@@ -1,10 +1,6 @@
require File.expand_path('../../spec_helper', __FILE__)
describe "bundle check" do
- before :each do
- in_app_root
- end
-
it "returns success when the Gemfile is satisfied" do
install_gemfile <<-G
source "file://#{gem_repo1}"
@@ -63,4 +59,21 @@ describe "bundle check" do
@exitstatus.should_not == 0 if @exitstatus
out.should =~ /The default Gemfile was not found/
end
+
+ describe "when locked" do
+ before :each do
+ system_gems "rack-1.0.0"
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+ bundle "lock"
+ end
+
+ it "rebuilds .bundle/environment.rb " do
+ bundled_app('.bundle/environment.rb').delete
+ bundle :check
+ bundled_app('.bundle/environment.rb').should exist
+ end
+ end
end