Class: Katalyst::Kpop::Matchers::SrcMatcher Private
- Inherits:
-
Base
- Object
- RSpec::Rails::Matchers::BaseMatcher
- Base
- Katalyst::Kpop::Matchers::SrcMatcher
- Defined in:
- lib/katalyst/kpop/matchers/src_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(expected, actual) ⇒ Object
private
rubocop:disable Naming/PredicateMethod.
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.
8 9 10 |
# File 'lib/katalyst/kpop/matchers/src_matcher.rb', line 8 def description "contain a kpop frame with src #{expected.inspect}" 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.
23 24 25 |
# File 'lib/katalyst/kpop/matchers/src_matcher.rb', line 23 def "expected a kpop frame with src #{expected.inspect} but received #{actual.native.to_html.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.
27 28 29 |
# File 'lib/katalyst/kpop/matchers/src_matcher.rb', line 27 def "expected not to find a kpop frame with src #{expected}" end |
#match(expected, 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.
rubocop:disable Naming/PredicateMethod
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/katalyst/kpop/matchers/src_matcher.rb', line 12 def match(expected, actual) # rubocop:disable Naming/PredicateMethod case expected when String actual[:src].to_s.eql?(expected) when Regexp actual[:src].to_s.match?(expected) else raise ArgumentError, expected end end |