search for: forums_proxy

Displaying 1 result from an estimated 1 matches for "forums_proxy".

2007 May 17
4
How to mock helpers in view specs ?
...t_user'' for #<#<Class:0xb6204d90>:0xb6204d54> On line #21 of app/views/forum_categories/index.rhtml But in before, I setup the correct stub: describe "forum_categories/index (anonymous user)" do before do @forum_category = mock("forum category") @forums_proxy = mock("forums proxy") @forum = mock("forum") @topics_proxy = mock("topics proxy") @forum_category.stub!(:forums).and_return(@forums_proxy) @forum.stub!(:topics).and_return(@topics_proxy) assigns[:forum_categories] = [@forum_category] @contro...