<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 <<a href="mailto:wschenk@gmail.com">wschenk@gmail.com</a>> 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. 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. 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> integrate_views<br>
fixtures :orders<br><br> it "should set the right order amount" do<br> prepare_order_mock<br><br> post "subscribe", {:sub_type => "1"}<br><br> fail "This should throw an error"<br>
end<br>end<br><br>It then returns: "0 examples, 0 failures".<br><br>How is such a thing possible? This seems like a serious problem; I<br>would expect an exception from somewhere inside of the post, or the<br>
fail message. 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. 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. 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. 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