[rspec-users] Specing a rails monkey patch
Mikel Lindsaar
raasdnil at gmail.com
Wed Jul 23 03:17:27 EDT 2008
On Mon, Jul 21, 2008 at 6:38 PM, Keith McDonnell <keith at dancingtext.com> wrote:
> I /could/ use an SQL cursor but:
> I don't know if these are valid reasons however :)
The only thing you gain with a direct SQL cursor is the guarantee of
hitting each row exactly once without having to pull down all the IDs
into an array first.
> Thanks for your suggested solution (transaction, cursor, find_by_sql &
> fetch). I'll play around with it & see what I can do. Can't immediately
> envision how to spec it though.
You'd stub out the model.
class Record
end
--
http://lindsaar.net/
Rails, RSpec and Life blog....
More information about the rspec-users
mailing list