Skip to content

Files

Latest commit

 

History

History
22 lines (14 loc) · 499 Bytes

RSpec-StubbedMock.md

File metadata and controls

22 lines (14 loc) · 499 Bytes

Pattern: Message expectation with configured response

Issue: -

Description

Checks that message expectations do not have a configured response.

Examples

# bad
expect(foo).to receive(:bar).with(42).and_return("hello world")

# good (without spies)
allow(foo).to receive(:bar).with(42).and_return("hello world")
expect(foo).to receive(:bar).with(42)

Further Reading