A description of an expectation. An expectation has the power to call the proxy method or completely ignore it
Initializes a new instance of an expectation
# File lib/caricature/expectation.rb, line 101 def initialize(method_name, args, error_args, return_value, super_mode) @method_name, @args, @error_args, @return_value, @super = method_name, args, error_args, return_value, super_mode @any_args = true end
indicates whether super needs to be called somewhere
# File lib/caricature/expectation.rb, line 123 def call_super? !@super.nil? end
executes this expectation with its configuration
# File lib/caricature/expectation.rb, line 128 def execute(*margs) ags = any_args? ? (margs.empty? ? :any : margs) : args raise *@error_args if has_error_args? return return_value if has_return_value? nil end
indicates whether this expecation will raise an event.
# File lib/caricature/expectation.rb, line 108 def has_error_args? !@error_args.nil? end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.