[rspec-users] When to stub_model?

Lee Lee.Longmore at googlemail.com
Wed May 20 09:20:37 EDT 2009

> I can't remember if you can do that, to be honest. I think the hash of
> parameters to stub_model is used to set up stubs on the object - so
> they won't get passed to the constructor. Hopefully someone else on
> the list should be able to tell you if this is possible.

Matt, I have since looked at the source for stub_model on RSpec's RDoc
and I think you're right and it's not possible. I guess one option
would be to fallback to mock_model for this model.

More information about the rspec-users mailing list