Parent

Files

Caricature::RSpecMatchers::HaveReceived

Public Class Methods

new(expected) click to toggle source
    # File lib/caricature/rspec/integration.rb, line 18
18:       def initialize(expected)
19:         @expected = expected
20:         @block_args, @error, @args = nil, "", [:any]
21:       end

Public Instance Methods

allow_any_arguments() click to toggle source

allow any arguments ignore the argument constraint

    # File lib/caricature/rspec/integration.rb, line 58
58:       def allow_any_arguments
59:         @args = :any
60:         self
61:       end
failure_message_for_should() click to toggle source
    # File lib/caricature/rspec/integration.rb, line 35
35:       def failure_message_for_should
36:         "expected #{@target.inspect} to have received #{@expected}" + @error
37:       end
failure_message_for_should_not() click to toggle source
    # File lib/caricature/rspec/integration.rb, line 39
39:       def failure_message_for_should_not
40:         "expected #{@target.inspect} not to have received #{@expected}" + @error
41:       end
matches?(target) click to toggle source
    # File lib/caricature/rspec/integration.rb, line 23
23:       def matches?(target)
24:         @target = target
25: 
26:         veri = @target.did_receive?(@expected).with(*@args)
27:         veri.with_block_args(*@block_args) if @block_args
28:         result = veri.successful?
29: 
30:         @error = "\n#{veri.error}" unless result
31: 
32:         result
33:       end
with(*args) click to toggle source

constrain this verification to the provided arguments

    # File lib/caricature/rspec/integration.rb, line 44
44:       def with(*args)
45:         ags = *args
46:         @args = args
47:         @args = [:any] if (args.first.is_a?(Symbol) and args.first == :any) || ags.nil?
48:         # @callback = b if b
49:         self
50:       end
with_block_args(*args) click to toggle source
    # File lib/caricature/rspec/integration.rb, line 52
52:       def with_block_args(*args)
53:         @block_args = args
54:         self
55:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.