method
new
1.1.4 -
Show latest stable
- Class:
Spec::Mocks::ArgumentExpectation
new(args)public
No documentation available.
# File lib/spec/mocks/argument_expectation.rb, line 146
def initialize(args)
@args = args
if [:any_args] == args
@expected_params = nil
warn_deprecated(:any_args.inspect, "any_args()")
elsif args.length == 1 && args[0].is_a?(AnyArgsConstraint) then @expected_params = nil
elsif [:no_args] == args
@expected_params = []
warn_deprecated(:no_args.inspect, "no_args()")
elsif args.length == 1 && args[0].is_a?(NoArgsConstraint) then @expected_params = []
else @expected_params = process_arg_constraints(args)
end
end