[rspec-users] resource urls only work *after* a get() in controller spec

r_j_h_box-sf at yahoo.com r_j_h_box-sf at yahoo.com
Sat Jan 31 19:06:39 EST 2009

I'm encountering an interesting symptom during example execution.  I'm
making a shared example group that dries up belongs-to-me before_filter
testing, and it makes a callback to the example group that says
it_should_behave_like that.  The callback tells the shared example
where to expect a redirect for failure.

It seems that prior to
executing a get() (etc), the resource-based url functions aren't
accessible.  Following the get(), topics_url works fine.  But before
then, it gives an error like this:


this a known issue?  Is there a workaround I can use?  I haven't
stepped through get() to see what its doing that brings in the resource
functions, but if it's not well-known, I can do so and followup with
the answer.

Thanks in advance,


More information about the rspec-users mailing list