lib/webmock/api.rb in webmock-1.6.4 vs lib/webmock/api.rb in webmock-1.7.0

- old
+ new

@@ -1,19 +1,20 @@ module WebMock module API extend self - + def stub_request(method, uri) - WebMock::StubRegistry.instance.register_request_stub(WebMock::RequestStub.new(method, uri)) + WebMock::StubRegistry.instance. + register_request_stub(WebMock::RequestStub.new(method, uri)) end alias_method :stub_http_request, :stub_request def a_request(method, uri) WebMock::RequestPattern.new(method, uri) end - + class << self alias :request :a_request end def assert_requested(method, uri, options = {}, &block) @@ -27,6 +28,6 @@ request = WebMock::RequestPattern.new(method, uri, options).with(&block) verifier = WebMock::RequestExecutionVerifier.new(request, options.delete(:times)) WebMock::AssertionFailure.failure(verifier.negative_failure_message) unless verifier.does_not_match? end end -end \ No newline at end of file +end