method

constraint_for

rspec latest stable - Class: Spec::Mocks::ArgumentExpectation

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.1.12) is shown here.

constraint_for(arg)
public

No documentation available.

# 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