[rspec-users] Named routes problem... more rails than rspec

Jason Nah jason.nah at gmail.com
Sun Jan 30 18:53:02 EST 2011

Thanks for that... although the exception still bugs me... and digging
through the router code in rails is mighty obtuse.

I'm switching over to rspec mocks to get me over this... (was using mocha).

One problem I ran into, I'm testing a mailer (+ view), and I'm trying to
generate the email ONCE for the entire spec, and then run various it {
should have_body_text(x) }

If I generate the email once using before(:all), I don't have access to any
mock methods (which is understandable). Is there a way to get this going? Or
am I going to have to do the whole thing in one big "it" block?


On 31 January 2011 04:33, David Chelimsky <dchelimsky at gmail.com> wrote:

> On Jan 30, 2011, at 9:34 AM, Rick DeNatale wrote:
> > On Sun, Jan 30, 2011 at 9:09 AM, David Chelimsky <dchelimsky at gmail.com>
> wrote:
> >> You can either use mock_model or mock_stub
> >
> >
> > David,
> >
> > Did you mean to say stub_model rather than mock_stub?
> Yes :)
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110131/1abd2dc5/attachment.html>

More information about the rspec-users mailing list