README.md in stub_requests-0.1.9 vs README.md in stub_requests-0.1.10

- old
+ new

@@ -82,22 +82,22 @@ <a id="stubbing-service-endpoints"></a> ### Stubbing service endpoints ```ruby -StubRequests.stub_endpoint(:google_ads, :index) +StubRequests.stub_endpoint(:ads_index) .to_return(code: 204, body: "") # This is the equivalent of doing the following in WebMock Settings.google_ads_base_uri = "https://api.google.com/v5" WebMock.stub_request(:get, "#{Settings.google_ads_base_uri}/ads") .to_return(status: 204, body: "") ``` ```ruby -StubRequests.stub_endpoint(:google_ads, :update, id: 1) do +StubRequests.stub_endpoint(:ads_update, id: 1) do with(body: request_body.to_json) to_return(code: 200, body: response_body.to_json) end # This is the equivalent of doing the following in WebMock @@ -115,11 +115,11 @@ Metrics collection are by default turned off. It can be turned on by the following code. ```ruby StubRequests.configure do |config| - config.record_metrics = true + config.record_stubs = true end ``` <a id="endpoint-invocation-callbacks"></a> ### Endpoint invocation callbacks @@ -231,35 +231,35 @@ # # 3. Copy the stubs into a module # module DocumentStubs def stub_documents_show(id:, &block) - StubRequests.stub_endpoint(:documents, :documents_show, id: id, &block) + StubRequests.stub_endpoint(:documents_show, id: id, &block) end def stub_documents_index(&block) - StubRequests.stub_endpoint(:documents, :documents_index, &block) + StubRequests.stub_endpoint(:documents_index, &block) end def stub_documents_create(&block) - StubRequests.stub_endpoint(:documents, :documents_create, &block) + StubRequests.stub_endpoint(:documents_create, &block) end def stub_documents_update(id:, &block) - StubRequests.stub_endpoint(:documents, :documents_update, id: id, &block) + StubRequests.stub_endpoint(:documents_update, id: id, &block) end def stub_document_put(id:, &block) - StubRequests.stub_endpoint(:documents, :document_put, id: id, &block) + StubRequests.stub_endpoint(:document_put, id: id, &block) end def stub_documents_destroy(id:, &block) - StubRequests.stub_endpoint(:documents, :documents_destroy, id: id, &block) + StubRequests.stub_endpoint(:documents_destroy, id: id, &block) end end ```