class Mocha::ParameterMatchers::RegexpMatches

Parameter matcher which matches if specified regular expression matches actual paramter.

def initialize(regexp)

Other tags:
    Private: -
def initialize(regexp)
  @regexp = regexp
end

def matches?(available_parameters)

Other tags:
    Private: -
def matches?(available_parameters)
  parameter = available_parameters.shift
  return false unless parameter.respond_to?(:=~)
  parameter =~ @regexp
end

def mocha_inspect

Other tags:
    Private: -
def mocha_inspect
  "regexp_matches(#{@regexp.mocha_inspect})"
end