module

Cli::Spec::Helper

Extends modules for testing commands.

Instance methods

exit_command(output : String | Regex | Nil = nil, error : String | Regex | Nil = nil, code : Int32 | Nil = nil)

Returns a new Crystal Spec expectation that asserts how a command exits.

Parameters

  • output : An expected output. If nil, the test is omitted.
  • error : An expected error output. If nil, the test is omitted.
  • code : An expected exit code. If nil, the test is omitted.
Source