11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/convenient_service/rspec/matchers/results/be_result.rb', line 11
def be_result(status, *args, **kwargs, &block)
case status
when :success
Classes::Results::BeSuccess.new(*args, **kwargs, &block)
when :failure
Classes::Results::BeFailure.new(*args, **kwargs, &block)
when :error
Classes::Results::BeError.new(*args, **kwargs, &block)
when :not_success
Classes::Results::BeNotSuccess.new(*args, **kwargs, &block)
when :not_failure
Classes::Results::BeNotFailure.new(*args, **kwargs, &block)
when :not_error
Classes::Results::BeNotError.new(*args, **kwargs, &block)
end
end
|