Improve output of exec matcher with chained command

This commit is contained in:
Tim Sharpe 2011-07-17 10:56:21 +10:00
parent bcc7ffc6d2
commit 0b2c38fa90
1 changed files with 8 additions and 1 deletions

View File

@ -20,15 +20,22 @@ module PuppetRSpec
end
ret
end
description do
"create Exec['#{expected_title}']"
end
failure_message_for_should do |actual|
"expected that the catalogue would contain Exec['#{expected_title}']"
"expected that the catalogue would contain Exec['#{expected_title}']#{with_command_msg}"
end
chain :with_command do |expected_command|
@expected_command = expected_command
end
def with_command_msg
@expected_command.nil?? "" : " with the command `#{@expected_command}`"
end
end
end
end