spec/configurators/bundler_configurator_spec.rb in rconf-0.5.3 vs spec/configurators/bundler_configurator_spec.rb in rconf-0.5.5
- old
+ new
@@ -16,11 +16,11 @@
def success_result(output=nil)
flexmock('res', :success? => true, :output => output)
end
before(:each) do
- lang = RightConf::Language.parse('bundler { bundler_version "0" }')
+ lang = RightConf::Language.parse('bundler { version "0" }')
@configurator = lang.configurators.first
[:report_check, :report_result, :report_fatal, :report_success].each do |meth|
flexmock(@configurator).should_receive(meth)
end
end
@@ -32,10 +32,10 @@
'bundle', 'install', {:abort_on_failure=>"Failed to install gems"}).and_return(success_result)
@configurator.run_linux
end
it 'should install bunlder if needed' do
- flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
+ flexmock(RightConf::Command.instance).should_receive(:execute).twice.with(
'bundle', '--version').and_return(success_result('1'))
flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
'bundle', 'install', {:abort_on_failure=>"Failed to install gems"}).and_return(success_result)
flexmock(RightConf::Command.instance).should_receive(:execute).once.with(
'gem', 'uninstall', 'bundler', '-a', '-x', {:abort_on_failure=>"Failed to uninstall bundler"}).and_return(success_result)