Method: Beaker::Options::Validator#validate_fail_mode

Defined in:
lib/beaker/options/validator.rb

#validate_fail_mode(fail_mode) ⇒ nil

Raises an error if fail_mode is not a supported failure mode.

Parameters:

  • fail_mode (String)

    Failure mode setting

Returns:

  • (nil)

    Does not return anything



53
54
55
56
57
58
# File 'lib/beaker/options/validator.rb', line 53

def validate_fail_mode(fail_mode)
  #check for valid fail mode
  if fail_mode !~ VALID_FAIL_MODES
    validator_error "--fail-mode must be one of fast or slow, not '#{fail_mode}'"
  end
end