[rspec-users] Mocking find_by_sql

Fernando Perez lists at ruby-forum.com
Sat Jun 6 05:16:49 EDT 2009

> Same deal as your other post about find_by_sql. Set the message
> expectation on the method on the class:
> Post.should_receive(:paginate)

Unfortunately it doesn't work :-( I'll have to dive into the 
will_paginate source code to find out how it plugs itself in AR.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list