class Spec::Matchers::Match

:nodoc:

def description

def description
  "match #{@expected.inspect}"
end

def failure_message

def failure_message
  return "expected #{@actual.inspect} to match #{@expected.inspect}", @expected, @actual
end

def initialize(expected)

:nodoc:
def initialize(expected)
  @expected = expected
end

def matches?(actual)

def matches?(actual)
  @actual = actual
  return true if actual =~ @expected
  return false
end

def negative_failure_message

def negative_failure_message
  return "expected #{@actual.inspect} not to match #{@expected.inspect}", @expected, @actual
end