From 6c896b52031c55dddac6ce3e58e8ab43535ec63c Mon Sep 17 00:00:00 2001 From: Shira Maximov Date: Sun, 29 Apr 2018 15:37:58 +0300 Subject: [PATCH] REF #20538 - add not found error type --- lib/hammer_cli/testing/command_assertions.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/hammer_cli/testing/command_assertions.rb b/lib/hammer_cli/testing/command_assertions.rb index a696330d..ceac05e8 100644 --- a/lib/hammer_cli/testing/command_assertions.rb +++ b/lib/hammer_cli/testing/command_assertions.rb @@ -108,6 +108,13 @@ def common_error_result(command, message, heading=nil) expected_result end + def not_found_error_result(command, message, heading=nil) + expected_result = CommandExpectation.new + expected_result.expected_err = common_error(command, message, heading) + expected_result.expected_exit_code = HammerCLI::EX_NOT_FOUND + expected_result + end + def success_result(message) CommandExpectation.new(message) end