Class: Smartest::CompoundMatcher
- Defined in:
- lib/smartest/matchers.rb
Direct Known Subclasses
Constant Summary collapse
- NEGATED_EXPECTATION_ERROR =
"not_to does not support matcher composition with .and or .or"
Instance Attribute Summary collapse
-
#matchers ⇒ Object
readonly
Returns the value of attribute matchers.
Instance Method Summary collapse
-
#initialize(*matchers) ⇒ CompoundMatcher
constructor
A new instance of CompoundMatcher.
- #negated_expectation_error ⇒ Object
- #supports_negated_expectation? ⇒ Boolean
Methods inherited from Matcher
Constructor Details
#initialize(*matchers) ⇒ CompoundMatcher
Returns a new instance of CompoundMatcher.
76 77 78 79 80 81 |
# File 'lib/smartest/matchers.rb', line 76 def initialize(*matchers) @matchers = matchers.flat_map do |matcher| matcher.is_a?(self.class) ? matcher.matchers : matcher end reset_result end |
Instance Attribute Details
#matchers ⇒ Object (readonly)
Returns the value of attribute matchers.
72 73 74 |
# File 'lib/smartest/matchers.rb', line 72 def matchers @matchers end |
Instance Method Details
#negated_expectation_error ⇒ Object
87 88 89 |
# File 'lib/smartest/matchers.rb', line 87 def negated_expectation_error NEGATED_EXPECTATION_ERROR end |
#supports_negated_expectation? ⇒ Boolean
83 84 85 |
# File 'lib/smartest/matchers.rb', line 83 def supports_negated_expectation? false end |