module Cli::Spec::Helper

Overview

Extends modules for testing commands.

Defined in:

spec/helper.cr

Instance Method Summary

Instance Method Detail

def 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.

[View source]