spec/command_spec.rb in rconf-0.9.18 vs spec/command_spec.rb in rconf-0.9.19

- old
+ new

@@ -25,21 +25,20 @@ flexmock(RightConf::Platform.instance).should_receive(:dispatch).with('test', nil, '42', Proc).once.and_return(success_result) RightConf::Command.execute('test', '42') end it 'should report fatal errors when required to' do - flexmock(RightConf::Platform.instance).should_receive(:dispatch).with('test', nil, '42', + flexmock(RightConf::Platform.instance).should_receive(:dispatch).with('test', nil, '42', Proc).once.and_return(failed_result) flexmock(RightConf::Command.instance).should_receive(:report_fatal).once.with("FAILED: 'test 42' returned\n1") RightConf::Command.execute('test', '42', :abort_on_failure => 'FAILED') end - + it 'should setup environment variables' do ENV['THIS_IS_A_TEST_ENV_VALUE'].should be_nil res = RightConf::Command.execute('env', :env => { 'THIS_IS_A_TEST_ENV_VALUE' => '42' }) ENV['THIS_IS_A_TEST_ENV_VALUE'].should be_nil res.output.should =~ /^THIS_IS_A_TEST_ENV_VALUE=42$/ end end -