Pattern: Missing use of .and_yield
Issue: -
This rule checks for calling a block within a stub.
# bad
allow(foo).to receive(:bar) { |&block| block.call(1) }
# good
expect(foo).to be(:bar).and_yield(1)
Pattern: Missing use of .and_yield
Issue: -
This rule checks for calling a block within a stub.
# bad
allow(foo).to receive(:bar) { |&block| block.call(1) }
# good
expect(foo).to be(:bar).and_yield(1)