Module: ProtoPharm::StubComponents::FailureResponse
- Included in:
- ActionStub
- Defined in:
- lib/proto_pharm/stub_components/failure_response.rb
Instance Method Summary collapse
- #to_fail ⇒ Object
- #to_fail_with(code = :invalid_argument, message = "unknown cause", **metadata) ⇒ Object
Instance Method Details
#to_fail ⇒ Object
13 14 15 |
# File 'lib/proto_pharm/stub_components/failure_response.rb', line 13 def to_fail to_fail_with end |
#to_fail_with(code = :invalid_argument, message = "unknown cause", **metadata) ⇒ Object
9 10 11 |
# File 'lib/proto_pharm/stub_components/failure_response.rb', line 9 def to_fail_with(code = :invalid_argument, = "unknown cause", **) to_raise(exception_class(code).new(, .serialize(code: code, message: , **))) end |