Hi all,
First of all - thanks a lot to all you guys who developed
this great tool!
Now I have a simple feature request, in RSpec we could
write spec code like this:
it 'should fetch page' do
Net::HTTP.should_receive(:get_response).with('http://example.com')
fetch('http://example.com') # or anything else which fetches the
page
end
now if my understanding is correct with WebMock we'd
have to do something like:
it 'should fetch page' do
stub_request(:any, "http://example.com")
fetch('http://example.com')
a_request(:get, "http://example.com").should_not have_been_made
end
now I would like to write this instead:
it 'should fetch page' do
WebMock.should_request(:get, "http://example.com")
fetch('http://example.com')
end
i.e. set up stub and expectation in the same line,
is that a reasonable feature to have? Or is it possible
to do that already?
Sincerely,
Evgeniy