spec/beaker/dsl/helpers_spec.rb in beaker-1.6.2 vs spec/beaker/dsl/helpers_spec.rb in beaker-1.7.0

- old
+ new

@@ -308,24 +308,25 @@ :acceptable_exit_codes => [0] ) subject.apply_manifest_on( agent, 'class { "boo": }') end - it 'accepts an array of hosts' do + it 'operates on an array of hosts' do the_hosts = [master, agent] subject.should_receive( :create_remote_file ).twice.and_return( true ) the_hosts.each do |host| subject.should_receive( :puppet ). with( 'apply', '--verbose', host.to_s ). and_return( 'puppet_command' ) subject.should_receive( :on ). with( host, 'puppet_command', - :acceptable_exit_codes => [0] ).ordered + :acceptable_exit_codes => [0, 1] ).ordered end - subject.apply_manifest_on( the_hosts, 'include foobar') + result = subject.apply_manifest_on( the_hosts, 'include foobar', :acceptable_exit_codes => [0,1] ) + result.should(be_an(Array)) end it 'adds acceptable exit codes with :catch_failures' do subject.should_receive( :create_remote_file ).and_return( true ) subject.should_receive( :puppet ).