lib/stub_requests/api.rb in stub_requests-0.1.10 vs lib/stub_requests/api.rb in stub_requests-0.1.11

- old
+ new

@@ -70,20 +70,20 @@ # # @return [WebMock::RequestStub] a mocked request # def stub_endpoint(endpoint_id, route_params = {}, &callback) endpoint = EndpointRegistry.instance.find!(endpoint_id) - uri = URI::Builder.build(endpoint.service_uri, endpoint.path, route_params) + uri = URI::Builder.build(endpoint.uri, route_params) webmock_stub = WebMock::Builder.build(endpoint.verb, uri, &callback) StubRegistry.instance.record(endpoint.id, webmock_stub) ::WebMock::StubRegistry.instance.register_request_stub(webmock_stub) end # :nodoc: def __stub_endpoint(endpoint_id, route_params = {}) endpoint = EndpointRegistry.instance.find!(endpoint_id) - uri = URI::Builder.build(endpoint.service_uri, endpoint.path, route_params) + uri = URI::Builder.build(endpoint.uri, route_params) endpoint_stub = WebMock::Builder.build(endpoint.verb, uri) ::WebMock::StubRegistry.instance.register_request_stub(endpoint_stub) end