[rspec-users] Mocking find_by_sql
David Chelimsky
dchelimsky at gmail.com
Fri Jun 5 17:04:07 EDT 2009
On Fri, Jun 5, 2009 at 3:29 PM, Fernando Perez <lists at ruby-forum.com> wrote:
> Hi, I cannot manage to mock a call to find_by_sql. Which class is
> actually getting called? It is not the model, and I tried ActiveRecord
> which didn't work either.
It's the model's class:
class Foo < AR::Base; end
describe Foo do
it "...." do
Foo.should_receive(:find_by_sql) ....
HTH,
David
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
More information about the rspec-users
mailing list