# File lib/spec/matchers/match.rb, line 13 def match(regexp) simple_matcher do |actual, matcher| matcher.failure_message = "expected #{actual.inspect} to match #{regexp.inspect}", regexp, actual matcher.negative_failure_message = "expected #{actual.inspect} not to match #{regexp.inspect}", regexp, actual matcher.description = "match #{regexp.inspect}" actual =~ regexp end end