Parent

Files

Caricature::RSpecMatchers::HaveRaised

Public Class Methods

new(expected) click to toggle source
    # File lib/caricature/rspec/integration.rb, line 65
65:       def initialize(expected)
66:         @expected = expected
67:         @block_args, @error, @args = nil, "", [:any]
68:       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 99
 99:       def allow_any_arguments
100:         @args = :any
101:         self
102:       end
failure_message_for_should() click to toggle source
    # File lib/caricature/rspec/integration.rb, line 81
81:       def failure_message_for_should
82:         "expected #{@target.inspect} to have received #{@expected}" + @error
83:       end
failure_message_for_should_not() click to toggle source
    # File lib/caricature/rspec/integration.rb, line 85
85:       def failure_message_for_should_not
86:         "expected #{@target.inspect} not to have received #{@expected}" + @error
87:       end
matches?(target) click to toggle source
    # File lib/caricature/rspec/integration.rb, line 70
70:       def matches?(target)
71:         @target = target
72: 
73:         veri = @target.did_raise_event?(@expected).with(*@args)
74:         result = veri.successful?
75: 
76:         @error = "\n#{veri.error}" unless result
77: 
78:         result
79:       end
with(*args) click to toggle source

constrain this verification to the provided arguments

    # File lib/caricature/rspec/integration.rb, line 90
90:       def with(*args)
91:         ags = *args
92:         @args = args
93:         @args = [:any] if (args.first.is_a?(Symbol) and args.first == :any) || ags.nil?
94:         # @callback = b if b
95:         self
96:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.