Quick question on rspec-rails for Rails 3: how to stub AR class methods like :find?


I recently switched to Rails 3(.1) and, using rspec-rails 2.6.1, I
find can no longer stub AR class methods, like :find.

So, where Comment is an AR class, I can’t do this:


What is the new way of doing this, please?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs