Parent

Files

Should

Public Instance Methods

have_raised_event?(name, &b) click to toggle source
   # File lib/caricature/bacon/integration.rb, line 7
7:   def have_raised_event?(name, &b)
8:     be(name) { |obj, *args| obj.did_raise_event?(name, &b).successful? }
9:   end
have_received?(name, &b) click to toggle source
   # File lib/caricature/bacon/integration.rb, line 3
3:   def have_received?(name, &b)
4:     be(name) { |obj, *args| obj.did_receive?(name, &b).successful? }
5:   end
satisfy(*args, &block) click to toggle source
    # File lib/caricature/bacon/integration.rb, line 11
11:   def satisfy(*args, &block)
12:     if args.size == 1 && String === args.first
13:       description = args.shift
14:     else
15:       description = ""
16:     end
17:     r=nil
18:     err = nil
19:     begin
20:       r = block.call(@object, *args)
21:     rescue Caricature::ArgumentMatchError => e
22:       err =e 
23:     end
24:     if Bacon::Counter[:depth] > 0
25:       Bacon::Counter[:requirements] += 1
26:       raise (err.is_a?(Caricature::ArgumentMatchError) ? err : Bacon::Error.new(:failed, description)) unless @negated ^ r
27:       r
28:     else
29:       @negated ? !r : !!r
30:     end
31:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.