Anyone know of a way to shorten this to one line? (RSpec 2)
location = mock
location.should_receive(:build)
For example, you can define the following:
location = stub
location.stub(build: true)
The above is the same as:
location = stub(build :true)
So, anyone see a way to specify an expectation in the mock call?
location = mock.tap { |loc| loc.should_receive(:build) }