This is my code:
# Execute the constructed command, logging out each line
log.info "Executing '#{command.join(' ')}'"
begin
timeout(config['deploy-timeout'].to_i) do
execute_and_log command
end
rescue Exception => e
log.info 'Err, timeout, ouch'
raise Timeout::Error
end
I want to check if the message "Err, timeout, ouch" was printed here:
Scenario: Normal deploy that times out because it takes too long
Given the event handler is configured to handle events for '^bla$'
...
And the deploy script will take '10' seconds
...
And I expect 'DEPLOY' Serf event '1' to contain data 'status' is 'running'