summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2011-11-30 10:55:22 -0800
committerErik Michaels-Ober <sferik@gmail.com>2011-11-30 10:55:22 -0800
commit53bc941d35b819ebda399b630594cc70b4938c6f (patch)
treea3cf1323369f7479f10a572ceea7b4da99bd2354
parent84cc2e6d2c77d1da44334db91bfe7239a70e0c33 (diff)
parentfb5010f71691b50d28fa7107c0b871fa8d6d63fe (diff)
downloadbundler-53bc941d35b819ebda399b630594cc70b4938c6f.tar.gz
Merge pull request #1563 from jredville/master
Fixed #1560 and update tests
-rw-r--r--lib/bundler/cli.rb1
-rw-r--r--spec/other/clean_spec.rb7
-rw-r--r--spec/spec_helper.rb2
3 files changed, 7 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..b9c648ad9d 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
@@ -440,10 +441,12 @@ describe "bundle clean" do
gem "bindir"
G
bundle :install
+
bundle "clean --force"
sys_status "foo"
- @existstatus.should_not == 0
+
+ exitstatus.should == 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
-