-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Verifying doubles allows you to ensure that you're not mocking up attributes and methods that don't exist on the mocked class.
rspec-activemodel-mocks should support verifying doubles when using mock_model
. I was able to enable it by simply changing:
double("#{model_class.name}_#{stubs[:id]}", stubs).tap do |m| |
double("#{model_class.name}_#{stubs[:id]}", stubs).tap do |m|
to
instance_double(model_class, stubs).tap do |m|
This works great for how I'm using this gem, but I suspect it might break things for other users, for example if mock_model
was passed "A String representing a Class that does not exist" (?)
I would be happy to work on a PR if given some advice on how to proceed.
dkubb, jdelStrother and timstotttimstott
Metadata
Metadata
Assignees
Labels
No labels