When writing RSpec tests, I find myself writing a lot of code that looks like this in order to ensure that a method was called during the execution of a test (for the sake o
it "should call 'bar' with appropriate arguments" do expect(subject).to receive(:bar).with("an argument I want") subject.foo end