Displaying 2 results from an estimated 2 matches for "forum_categori".
Did you mean:
forum_category
2007 May 17
4
How to mock helpers in view specs ?
...l,
I am mocking the following Rails view (inside a partial):
<%= render :partial => "forums/forum",
:collection => forum_category.forums.readable_by(current_user? ?
current_user : nil) %>
My spec fails with the following message:
1)
ActionView::TemplateError in ''forum_categories/index (anonymous user)
should only render forums accessible to anonymous users''
undefined local variable or method `current_user'' for
#<#<Class:0xb6204d90>:0xb6204d54>
On line #21 of app/views/forum_categories/index.rhtml
But in before, I setup the correct stub:
de...
2007 May 10
12
shared descriptions -- a couple of issues
Hello All,
I''ve just upgraded to rspec/rspec_on_rails 0.9.3 and am very excited
about shared descriptions. They couldn''t have come at a better time: I
just finished refactoring some REST controllers so that the bulk of
the actions are inherited from a superclass. Now I can write the
specs once, too. :)
I''ve hit a couple of snags, though. I thought I''d