# File lib/hammer_cli/testing/output_matchers.rb, line 26 def self.matcher(label, value) Regexp.new(Regexp.quote(label) + ':[ ]+' + Regexp.quote(value)) end
# File lib/hammer_cli/testing/output_matchers.rb, line 17 def initialize(label, value) @expected = FieldMatcher.matcher(label, value) end
# File lib/hammer_cli/testing/output_matchers.rb, line 21 def assert_match(test_ctx, actual) message = "Regex /#{@expected.source}/ didn't match the output:\n#{actual}" test_ctx.assert(@expected =~ actual, message) end