[rspec-users] rails rspec silently failing

Hans de Graaff hans at degraaff.org
Wed Feb 6 00:58:42 EST 2008

On Tue, 2008-02-05 at 23:50 -0500, Will Schenk wrote:
> This is both running the file directly or using script/spec.  If I
> leave the spec file as is, and I comment out a line
> @order.send_order_to_google_checkout in the _controller_ then it runs
> fine, i.e. it gets to the fail statement.

Since you don't include the actual controller code it's a bit hard to
help out here, but it's better form to just mock this code in your
controller spec. You can then vary the different responses from the
google checkout and see if your controller handles them correctly. 

The actual interaction with google checkout should be described with
examples in the order_spec.rb file. Right now you are testing the whole
stack and it becomes very hard to track down what is going wrong

Kind regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/rspec-users/attachments/20080206/2bbe6c01/attachment.bin 

More information about the rspec-users mailing list