rspec/rspec-rails — pull request #472 by tiagogodinho (2011-12-20 16:06:23+00:00)
Title: stub "new_record?" method on stub_model

In **Mongoid 2.4.0** `#to_param` return an error because this version override `#to_key`.

**ActiveModel** `#to_key` call `#persisted?` while **Mongoid 2.4.0** `#to_key` call `#new_record?`.

Issue from mongoid/mongoid#1510.