Rspec tests usually follow a human-readable schema that's almost an English sentence.
We currently check whether a Typhoeus stub was called with expect(stub.times_called).to eq(1). Side note: times_called uses Typhoeus private data.
Rspec, at least for yield_control, has expect { ... }.to yield_control.twice and similar tests. Following the same design as yield_control we could implement the following have_been_called matcher:
Rspec tests usually follow a human-readable schema that's almost an English sentence.
We currently check whether a Typhoeus stub was called with
expect(stub.times_called).to eq(1)
. Side note:times_called
uses Typhoeus private data.Rspec, at least for
yield_control
, hasexpect { ... }.to yield_control.twice
and similar tests. Following the same design asyield_control
we could implement the followinghave_been_called
matcher: