contains the syntax for building up an expectation This is shared between the ExpecationBuilder and the Expectation
indicates whether this expectation should match with any arguments or only for the specified arguments
# File lib/caricature/expectation.rb, line 75
75: def any_args?
76: @any_args
77: end
(Not documented)
# File lib/caricature/expectation.rb, line 58
58: def raise(*args)
59: @error_args = args
60: self
61: end
tell the expectation it nees to return this value or the value returned by the block you provide to this method.
# File lib/caricature/expectation.rb, line 50
50: def return(value=nil)
51: @return_value = value
52: @return_value ||= yield if block_given?
53: self
54: end
tell the expectation it needs to call the super after the expecation execution
# File lib/caricature/expectation.rb, line 69
69: def super_after
70: @super = :after
71: end
tell the expecation it needs to call the super before the expectation exectution
# File lib/caricature/expectation.rb, line 64
64: def super_before
65: @super = :before
66: end
tell the expection which arguments it needs to respond to there is a magic argument here any which configures the expectation to respond to any arguments
# File lib/caricature/expectation.rb, line 41
41: def with(*args, &b)
42: @any_args = args.first.is_a?(Symbol) and args.first == :any
43: @args = args
44: @callback = b unless b.nil?
45: self
46: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.