diff options
author | Carl Lerche <carllerche@mac.com> | 2010-08-06 15:53:26 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-08-06 15:53:26 -0700 |
commit | 10c8e11db6f363619f184f471fe6928583715137 (patch) | |
tree | 4ee034a8803a25827b09c35efc2f225443dfc132 /spec/install/deploy_spec.rb | |
parent | f0b9eb2c100f7909ff4c3e8041e74d9e06658042 (diff) | |
download | bundler-10c8e11db6f363619f184f471fe6928583715137.tar.gz |
Have bundler remember that the bundle is frozen and ignore changes to the Gemfile during runtime
Diffstat (limited to 'spec/install/deploy_spec.rb')
-rw-r--r-- | spec/install/deploy_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb index 792fb36982..1d03c91aca 100644 --- a/spec/install/deploy_spec.rb +++ b/spec/install/deploy_spec.rb @@ -48,6 +48,22 @@ describe "install with --deployment or --frozen" do out.should_not include("You have changed in the Gemfile") end + it "can have --frozen set via an environment variable" do + gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + gem "rack-obama" + G + + ENV['BUNDLE_FROZEN'] = '1' + bundle "install" + out.should include("You have modified your Gemfile") + out.should include("You have added to the Gemfile") + out.should include("* rack-obama") + out.should_not include("You have deleted from the Gemfile") + out.should_not include("You have changed in the Gemfile") + end + it "explodes with the --frozen flag if you make a change and don't check in the lockfile" do gemfile <<-G source "file://#{gem_repo1}" @@ -130,5 +146,17 @@ describe "install with --deployment or --frozen" do out.should_not include("You have added to the Gemfile") out.should_not include("You have deleted from the Gemfile") end + + it "remembers that the bundle is frozen at runtime" do + bundle "install --deployment" + + gemfile <<-G + source "file://#{gem_repo1}" + gem "rack", "1.0.0" + gem "rack-obama" + G + + should_be_installed "rack 1.0.0" + end end end |