[rspec-users] Specing a rails monkey patch
Keith McDonnell
keith at dancingtext.com
Fri Jul 18 06:11:10 EDT 2008
Hi all,
I wrote an ActiveRecord extension to emulate a db cursor:
http://pastie.org/236367
As you can see, the spec doesn't really ensure that the records are
fetched in chunks. I'd like to mock the call to AR find and ensure that
it's called with an incrementing offset.
Any advice?
Keith
PS If you're interested, Jamis Buck wrote a (mySQL specific) DB cursor:
http://weblog.jamisbuck.org/2007/4/6/faking-cursors-in-activerecord
More information about the rspec-users
mailing list