Exception: ConvenientService::RSpec::Matchers::Results::BeResult::Exceptions::InvalidStatus

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/rspec/matchers/results/be_result/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(status:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • status (Object)

    Can be any type.



21
22
23
24
25
26
27
28
29
# File 'lib/convenient_service/rspec/matchers/results/be_result/exceptions.rb', line 21

def initialize_with_kwargs(status:)
  message = <<~TEXT
    Status `#{status.inspect}` is NOT valid.

    Valid statuses for `be_result` are `:success`, `:failure`, `:error`, `:not_success`, `:not_failure`, and `:not_error`.
  TEXT

  initialize(message)
end