[rspec-users] Trouble validating an exception

Ben Greenberg mailing_lists at bengreenberg.net
Mon Feb 2 18:30:20 EST 2009

Hi all,

This spec always passes:

     lambda do
       process_card @credit_card, billing_info, 10604, '', @gateway
     end.should raise_error(MinimalCart::CaptureFailureError) do |ex|
       ex.should be_nil
       ex.should_not be_nil
       ex.responses.should be_nil
       ex.responses.should_include @auth_response
       ex.responses.include?.with('a').should be_true

Clearly, it makes no sense.  Somehow the exception validation block is 
not running.  What am I doing wrong?


More information about the rspec-users mailing list