Class: Katalyst::Kpop::Matchers::ResponseMatcher Private
- Inherits:
-
Base
- Object
- RSpec::Rails::Matchers::BaseMatcher
- Base
- Katalyst::Kpop::Matchers::ResponseMatcher
- Defined in:
- lib/katalyst/kpop/matchers/response_matcher.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #description ⇒ Object private
- #failure_message ⇒ Object private
- #failure_message_when_negated ⇒ Object private
- #match(_, actual) ⇒ Object private
Methods inherited from Base
Instance Method Details
#description ⇒ Object
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.
17 18 19 |
# File 'lib/katalyst/kpop/matchers/response_matcher.rb', line 17 def description "a response" end |
#failure_message ⇒ Object
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.
21 22 23 |
# File 'lib/katalyst/kpop/matchers/response_matcher.rb', line 21 def "expected a response but received #{actual.inspect} instead" end |
#failure_message_when_negated ⇒ Object
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.
25 26 27 |
# File 'lib/katalyst/kpop/matchers/response_matcher.rb', line 25 def "expected not to receive a response" end |
#match(_, actual) ⇒ Object
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.
8 9 10 11 12 13 14 15 |
# File 'lib/katalyst/kpop/matchers/response_matcher.rb', line 8 def match(_, actual) case actual when ::ActionDispatch::Response ::ActionDispatch::TestResponse.from_response(actual) when ::ActionDispatch::TestResponse actual end end |