spec/configurators/bundler_configurator_spec.rb in rconf-0.7.6 vs spec/configurators/bundler_configurator_spec.rb in rconf-0.7.8

- old
+ new

@@ -30,26 +30,22 @@ after(:each) do RightConf::Command.instance.instance_variable_set(:@rvm_prefix, nil) end it 'should succeed when bundler succeeds' do - flexmock(RightConf::Command.instance).should_receive(:execute_in_ruby).once.with( - 'bundle', '--version').and_return(success_result('0')) - flexmock(RightConf::Command.instance).should_receive(:execute_in_ruby).once.with( - 'bundle','_0_', 'install', {:abort_on_failure=>"Failed to install gems"}).and_return(success_result) + should_execute_in_ruby('bundle', '--version').once.and_return(success_result('0')) + should_execute_in_ruby('bundle','_0_', 'install', + {:abort_on_failure=>"Failed to install gems"}).once.and_return(success_result) @configurator.run_linux end it 'should install bunlder if needed' do - flexmock(RightConf::Command.instance).should_receive(:execute_in_ruby).twice.with( - 'bundle', '--version').and_return(success_result('1')) - flexmock(RightConf::Command.instance).should_receive(:execute_in_ruby).once.with( - 'bundle','_0_', 'install', {:abort_on_failure=>"Failed to install gems"}).and_return(success_result) - flexmock(RightConf::Command.instance).should_receive(:execute_in_ruby).once.with( - 'gem', 'uninstall', 'bundler', '-a', '-x').and_return(success_result) - flexmock(RightConf::Command.instance).should_receive(:execute_in_ruby).once.with( - 'gem', 'install', 'bundler', '-v', '0', '--no-ri', '--no-rdoc', - {:abort_on_failure=>"Failed to install bundler"}).once.and_return(success_result) + should_execute_in_ruby('bundle', '--version').twice.and_return(success_result('1')) + should_execute_in_ruby('bundle','_0_', 'install', + {:abort_on_failure=>"Failed to install gems"}).once.and_return(success_result) + should_execute_in_ruby('gem', 'uninstall', 'bundler', '-a', '-x').once.and_return(success_result) + should_execute_in_ruby('gem', 'install', 'bundler', '-v', '0', '--no-ri', '--no-rdoc', + {:abort_on_failure=>"Failed to install bundler"}).once.and_return(success_result) @configurator.run_linux end end