diff options
author | Jim Deville <james@urbaninfluence.com> | 2011-11-29 22:44:32 -0800 |
---|---|---|
committer | Jim Deville <james@urbaninfluence.com> | 2011-11-29 22:44:32 -0800 |
commit | 9a8813e2f5c3928f0820149d4aa955ebba92e7fe (patch) | |
tree | b368fa7062952453e01c2f1826d6e21d19dba016 | |
parent | 84cc2e6d2c77d1da44334db91bfe7239a70e0c33 (diff) | |
download | bundler-9a8813e2f5c3928f0820149d4aa955ebba92e7fe.tar.gz |
Fixes #1560 with an exit code of 1, and makes running clean_spec.rb
directly possible
By requiring digest/sha1 in spec_helper.rb, clean_spec.rb can now be
ran stand alone. I also fixed a typo which exposed a failing test.
-rw-r--r-- | lib/bundler/cli.rb | 1 | ||||
-rw-r--r-- | spec/other/clean_spec.rb | 5 | ||||
-rw-r--r-- | spec/spec_helper.rb | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index da202fbc3c..11007e7e2d 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -579,6 +579,7 @@ module Bundler Bundler.load.clean else Bundler.ui.error "Can only use bundle clean when --path is set or --force is set" + exit 1 end end diff --git a/spec/other/clean_spec.rb b/spec/other/clean_spec.rb index 4e85682694..94457736b9 100644 --- a/spec/other/clean_spec.rb +++ b/spec/other/clean_spec.rb @@ -239,8 +239,9 @@ describe "bundle clean" do gem "rack", "1.0.0" G - bundle :clean + bundle :clean, :exitstatus => true + exitstatus.should eq(1) out.should == "Can only use bundle clean when --path is set or --force is set" end @@ -443,7 +444,7 @@ describe "bundle clean" do bundle "clean --force" sys_status "foo" - @existstatus.should_not == 0 + @exitstatus.should_not == 0 out.should == "1.0" end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 234abc9d6d..8528b20e01 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,6 +6,7 @@ require 'rubygems' require 'bundler' require 'rspec' require 'uri' +require 'digest/sha1' # Require the correct version of popen for the current platform if RbConfig::CONFIG['host_os'] =~ /mingw|mswin/ @@ -95,4 +96,3 @@ RSpec.configure do |config| ENV['BUNDLE_APP_CONFIG'] = nil end end - |