[rspec-users] View tests and fragment caching issue

David Chelimsky dchelimsky at gmail.com
Sun Dec 7 16:27:51 EST 2008


On Fri, Dec 5, 2008 at 1:21 PM, Christopher Bailey <chris at cobaltedge.com> wrote:
> I hope I'm just missing something obvious here, but I am using fragment
> caching in a partial for a view.  I test this view with an RSpec view test.
>  The particular test is using "real" data (i.e. not mocked objects, etc.).
>  When I run the test, it complains about not knowing of a route for the
> fragment.  The fragment parameter should be that though, a query param, not
> part of a path, etc.  Anyway, here's what I see for the error:
>      No route matches {:action=>"index", :fragment=>"similar_deals"}
> The partial has the following caching line in it:
>     <% cache({:fragment => 'similar_deals'}, :expires_in => 24.hours) do %>
> Can someone point me in the right direction for how to deal with this?

Seems like this is a deficiency in rspec-rails. Would you mind posting
this to http://rspec.lighthouseapp.com?

Thx

> --
> Christopher Bailey
> Cobalt Edge LLC
> http://cobaltedge.com
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list