[rspec-users] Fixing "expected success? to return true, got false"

Stephen Eley sfeley at gmail.com
Wed Jan 7 12:40:12 EST 2009

On Wed, Jan 7, 2009 at 6:36 AM, Matt Wynne <matt at mattwynne.net> wrote:
> I would start your debugging by adding a puts statement between lines 26 and
> 27 to show more of the (unexpected) response. Looking at response.code or
> response.body should give you some clues.

You can also check the logfiles.  I often keep two terminals running
in the background whenever I'm doing BDD coding; one's running
autospec, and the other one has 'tail -f log/test.log'.  I don't have
to look at that all the time, but when something breaks and I can't
figure out why it's a huge time saver.  I also found this post of Ben
Mabey's to be very useful for figuring out which chunk of log goes
with which spec:


Have Fun,
   Steve Eley (sfeley at gmail.com)
   ESCAPE POD - The Science Fiction Podcast Magazine

More information about the rspec-users mailing list