class Mocha::ParameterMatchers::RegexpMatches
Parameter matcher which matches if specified regular expression matches actual paramter.
def initialize(regexp)
- Private: -
def initialize(regexp) @regexp = regexp end
def matches?(available_parameters)
- Private: -
def matches?(available_parameters) parameter = available_parameters.shift return false unless parameter.respond_to?(:=~) parameter =~ @regexp end
def mocha_inspect
- Private: -
def mocha_inspect "regexp_matches(#{@regexp.mocha_inspect})" end