[rspec-users] View tests and fragment caching issue

Christopher Bailey chris at cobaltedge.com
Fri Dec 5 14:21:26 EST 2008


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?

-- 
Christopher Bailey
Cobalt Edge LLC
http://cobaltedge.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081205/34eedc95/attachment-0001.html>


More information about the rspec-users mailing list