search for: mock_fire_prevention

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

2011 May 26
3
Kaminari rspec testing undefined method page.
Someone use kaminari for pagination? I''m doing some tests but I don''t know why I have an undefined method page. Here is my simple test: describe "GET index" do it "assigns all fire_preventions as @fire_preventions" do FirePrevention.stub(:search) { [mock_fire_prevention] } get :index assigns(:fire_preventions).should eq([mock_fire_prevention]) end end The index action is: def index @search = FirePrevention.search(params[:search]) @fire_preventions = @search.page(params[:page]).per(Settings.fire_preventions_per_page) end I''m us...