method
constraint_for

1.1.12 -
Show latest stable
-
0 notes -
Class: Spec::Mocks::ArgumentExpectation
- 1.1.4
- 1.1.12 (0)
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
constraint_for(arg)
public
Hide source
# File lib/spec/mocks/argument_expectation.rb, line 20 def constraint_for(arg) return ArgumentConstraints::MatcherConstraint.new(arg) if is_matcher?(arg) return ArgumentConstraints::RegexpConstraint.new(arg) if arg.is_a?(Regexp) return ArgumentConstraints::EqualityProxy.new(arg) end