search for: topics_proxy

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

2007 May 17
4
How to mock helpers in view specs ?
...ews/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] @controller.stub!(:current_user?).and_return(false) @controller.stub!(:current_user).and_re...