spec/console_spec.rb in rubygems-tasks-0.2.0 vs spec/console_spec.rb in rubygems-tasks-0.2.1
- old
+ new
@@ -6,13 +6,13 @@
describe Gem::Tasks::Console do
describe "#console" do
include_context "rake"
if RUBY_VERSION < '1.9'
- let(:default_options) { %w[-Ilib -rrubygems -rrubygems/tasks.rb] }
+ let(:default_options) { %w[-Ilib -rrubygems -rrubygems/tasks] }
else
- let(:default_options) { %w[-Ilib -rrubygems/tasks.rb] }
+ let(:default_options) { %w[-Ilib -rrubygems/tasks] }
end
let(:custom_command) { 'ripl' }
let(:custom_options) { %w[-Ivendor -rfoo] }
@@ -22,12 +22,14 @@
subject.console
end
context "when project.bundler? == true" do
- it "should use `bundle console`" do
+ it "should use `bundle exec`" do
subject.project.stub!(:bundler?).and_return(true)
- subject.should_receive(:run).with('bundle', 'console')
+ subject.should_receive(:run).with(
+ 'bundle', 'exec', 'irb', *default_options
+ )
subject.console
end
end
end