contains the syntax for building up an expectation This is shared between the ExpecationBuilder and the Expectation
tell the expectation it needs to raise an error with the specified arguments
indicates whether this expectation should match with any arguments or only for the specified arguments
# File lib/caricature/expectation.rb, line 89 89: def any_args? 90: collected[:any_args] 91: end
Sets up arguments for the block that is being passed into the isolated method call
# File lib/caricature/expectation.rb, line 59 59: def pass_block(*ags, &b) 60: collected[:any_block_args] = ags.first.is_a?(Symbol) and args.first == :any 61: collected[:block_args] = ags 62: collected[:block_callback] = b unless b.nil? 63: self 64: end
# File lib/caricature/expectation.rb, line 68 68: def raise(*args) 69: collected[:error_args] = args 70: self 71: 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 51 51: def return(value=nil, &b) 52: collected[:return_value] = value 53: collected[:return_callback] = b if b 54: self 55: end
tell the expectation it needs to call the super after the expecation execution
# File lib/caricature/expectation.rb, line 81 81: def super_after(&b) 82: collected[:super] = :after 83: collected[:block] = b if b 84: self 85: end
tell the expecation it needs to call the super before the expectation exectution
# File lib/caricature/expectation.rb, line 74 74: def super_before(&b) 75: collected[:super] = :before 76: collected[:block] = b if b 77: self 78: 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 42 42: def with(*ags, &b) 43: collected[:any_args] = ags.first.is_a?(Symbol) and ags.first == :any 44: collected[:args] = ags 45: collected[:callback] = b unless b.nil? 46: self 47: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.