Module: CmdLineTest::Assertions
- Included in:
- Test::Unit::TestCase
- Defined in:
- lib/cmd_line_test.rb
Overview
Macros
Instance Method Summary collapse
Instance Method Details
#assert_failed_run ⇒ Object
91 92 93 |
# File 'lib/cmd_line_test.rb', line 91 def assert_failed_run flunk "Expects either thrown error or exit status not 0." if 0 == self.class.cli_exit_status && self.class.cli_error.empty? end |
#assert_out_contains(regex) ⇒ Object
95 96 97 |
# File 'lib/cmd_line_test.rb', line 95 def assert_out_contains regex assert_match regex, self.class.cli_output end |
#assert_successful_run ⇒ Object
85 86 87 88 89 |
# File 'lib/cmd_line_test.rb', line 85 def assert_successful_run = "Should run successfully, but" assert_equal 0, self.class.cli_exit_status, "#{} exit status is #{self.class.cli_exit_status}" assert self.class.cli_error.empty?, "#{} exception '#{self.class.cli_error}' has been thrown. Exception stack:\n" + self.class.cli_error_stack end |