Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Fixed #1560 and update tests #1563

Merged
merged 2 commits into from
Nov 30, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/bundler/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ def clean
Bundler.load.clean
else
Bundler.ui.error "Can only use bundle clean when --path is set or --force is set"
exit 1
end
end

Expand Down
7 changes: 5 additions & 2 deletions spec/other/clean_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ def should_not_have_gems(*gems)
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

Expand Down Expand Up @@ -440,10 +441,12 @@ def should_not_have_gems(*gems)
gem "bindir"
G
bundle :install

bundle "clean --force"

sys_status "foo"
@existstatus.should_not == 0

exitstatus.should == 0
out.should == "1.0"
end
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
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/
Expand Down Expand Up @@ -95,4 +96,3 @@ def pending_jruby_shebang_fix
ENV['BUNDLE_APP_CONFIG'] = nil
end
end