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

Methods

matches?   new  

Public Class methods

[Source]

    # File vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb, line 25
25:       def initialize(regexp)
26:         @regexp = regexp
27:       end

Public Instance methods

[Source]

    # File vendor/plugins/rspec/lib/spec/mocks/argument_expectation.rb, line 29
29:       def matches?(value)
30:         return value =~ @regexp unless value.is_a?(Regexp)
31:         value == @regexp
32:       end

[Validate]