<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is both running the file directly or using script/spec. &nbsp;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. &nbsp;Either way the code runs all the way through the action method. &nbsp;But if I call a method on the Order, then it seems to just disappear after the controller returns. &nbsp;Something is swallowing exceptions or something like that. &nbsp;It runs to the end though, and I know it runs to the end because I put in puts statements.<div><br class="webkit-block-placeholder"></div><div><br><div><div>On Feb 5, 2008, at 7:54 PM, Corey Haines wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span>T</span>hat seems more like rspec isn't even finding it. What is the file name? Is it in a location that rspec is going to look for it?<br><br>-Corey<br><br><div class="gmail_quote">On Feb 5, 2008 4:58 PM, Will Schenk &lt;<a href="mailto:wschenk@gmail.com">wschenk@gmail.com</a>&gt; wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've been beating my head against this for a couple of hours now, and<br>I'm a bit frustrated, so I apologize in advance.<br> <br>I'm trying to use rspec to test an order processing system, which uses<br>google checkout. &nbsp;The idea was to have a couple of orders in the<br>database in various stages, and hit the notifier interface to make<br>sure that everything transitioned to the right place. &nbsp;However, I<br> can't get to this, because rspec seems to silently blow-up somewhere.<br>This code "passes":<br><br>require File.dirname(__FILE__) + '/../spec_helper'<br><br>describe OrdersController do<br> &nbsp; integrate_views<br> &nbsp; fixtures :orders<br><br> &nbsp; it "should set the right order amount" do<br> &nbsp; &nbsp; prepare_order_mock<br><br> &nbsp; &nbsp; post "subscribe", {:sub_type =&gt; "1"}<br><br> &nbsp; &nbsp; fail "This should throw an error"<br> &nbsp; end<br>end<br><br>It then returns: "0 examples, 0 failures".<br><br>How is such a thing possible? &nbsp;This seems like a serious problem; I<br>would expect an exception from somewhere inside of the post, or the<br> fail message. &nbsp;Instead everything is green.<br><br>My only hypothesis is that since I'm creating an order object and<br>calling a bunch of methods on it and somehow that's verbotten. &nbsp;The<br>docs mention suggests mocking domain objects -- which seems if not<br> completely misguided at least seriously counter-intuitive -- and<br>perhaps this has something to do with it. &nbsp;But silently imploding<br>seems more like a bug.<br><br>I should mention that the controller actually works in Real Life, but<br> I was trying to get a little piece of mind and work out all the<br>permutations in a test just to make sure. &nbsp;And failing silently is<br>worse than no testing at all.<br><br>Taking a few deep breaths,<br>-w<br><br><br>_______________________________________________<br> rspec-users mailing list<br><a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br> </blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.coreyhaines.com">http://www.coreyhaines.com</a><br>The Internet's Premiere source of information about Corey Haines</blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Helvetica Neue'; font-size: 20px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Helvetica Neue'; font-size: 20px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Optima; font-size: 20px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Will Schenk</div><div><a href="mailto:wschenk@gmail.com">wschenk@gmail.com</a></div><div><a href="http://benchcoach.com/">http://benchcoach.com/</a></div><div><a href="http://sublimeguile.com/">http://sublimeguile.com/</a></div><div><a href="http://menumap.monkeythumb.net/">http://menumap.monkeythumb.net/</a></div></div></span></div></span></div></span> </div><br></div></body></html>