[rspec-users] mocking named_scope utilization

Juanma Cervera lists at ruby-forum.com
Fri Sep 12 05:20:00 EDT 2008


Hello,
I am having trouble to mock the chaining of named_scope in the
controller, also I would like to use will_paginate.

def index
  @things = Thing.allowed_for(@current_user).available.paginate :page =>
params[:page]
end

¿How to do it?
Thanks

Juanma Cervera
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list