Class Spec::Mocks::RegexpArgConstraint
In: lib/spec/mocks/argument_expectation.rb
Parent: Object

Methods

matches?   new  

Public Class methods

[Source]

    # File lib/spec/mocks/argument_expectation.rb, line 15
15:       def initialize(regexp)
16:         @regexp = regexp
17:       end

Public Instance methods

[Source]

    # File lib/spec/mocks/argument_expectation.rb, line 19
19:       def matches?(value)
20:         return value =~ @regexp unless value.is_a?(Regexp)
21:         value == @regexp
22:       end

[Validate]