Class: HammerCLI::Testing::OutputMatchers::IndexMatcher
- Inherits:
-
MatcherBase
- Object
- MatcherBase
- HammerCLI::Testing::OutputMatchers::IndexMatcher
- Defined in:
- lib/hammer_cli/testing/output_matchers.rb
Instance Method Summary collapse
- #assert_match(test_ctx, actual) ⇒ Object
-
#initialize(expected = []) ⇒ IndexMatcher
constructor
A new instance of IndexMatcher.
Constructor Details
#initialize(expected = []) ⇒ IndexMatcher
Returns a new instance of IndexMatcher.
60 61 62 63 64 65 |
# File 'lib/hammer_cli/testing/output_matchers.rb', line 60 def initialize(expected=[]) @line_matchers = [] expected.each do |line_expectation| @line_matchers << IndexLineMatcher.new(line_expectation) end end |
Instance Method Details
#assert_match(test_ctx, actual) ⇒ Object
67 68 69 70 71 |
# File 'lib/hammer_cli/testing/output_matchers.rb', line 67 def assert_match(test_ctx, actual) @line_matchers.each do |matcher| matcher.assert_match(test_ctx, actual) end end |