Pattern: Missing use of instance_spy
Issue: -
Checks for instance_double
used with have_received
.
# bad
it do
foo = instance_double(Foo).as_null_object
expect(foo).to have_received(:bar)
end
# good
it do
foo = instance_spy(Foo)
expect(foo).to have_received(:bar)
end