lib/rspec/request_describer.rb in rspec-request_describer-0.0.9 vs lib/rspec/request_describer.rb in rspec-request_describer-0.1.0

- old
+ new

@@ -21,11 +21,11 @@ subject do send_request end let(:send_request) do - send method, path, request_body, env + send http_method, path, request_body, env end let(:request_body) do if headers.any? { |key, value| key.downcase == "content-type" && value == "application/json" } params.to_json @@ -53,10 +53,10 @@ let(:endpoint_segments) do current_example = RSpec.respond_to?(:current_example) ? RSpec.current_example : example current_example.full_description.match(/(#{SUPPORTED_METHODS.join("|")}) (\S+)/).to_a end - let(:method) do + let(:http_method) do endpoint_segments[1].downcase end let(:path) do endpoint_segments[2].gsub(/:(\w+[!?=]?)/) { send($1) }