lib/rspec/request_describer.rb in rspec-request_describer-0.2.0 vs lib/rspec/request_describer.rb in rspec-request_describer-0.2.1
- old
+ new
@@ -22,11 +22,11 @@
subject do
send_request
end
let(:send_request) do
- process(
+ send(
http_method,
path,
headers: env,
params: request_body,
)
@@ -59,12 +59,12 @@
let(:endpoint_segments) do
current_example = ::RSpec.respond_to?(:current_example) ? ::RSpec.current_example : example
current_example.full_description.match(/(#{::Regexp.union(SUPPORTED_METHODS)}) (\S+)/).to_a
end
- # @return [Symbol] e.g. `:get`
+ # @return [String] e.g. `"get"`
let(:http_method) do
- endpoint_segments[1].downcase.to_sym
+ endpoint_segments[1].downcase
end
let(:path) do
endpoint_segments[2].gsub(/:(\w+[!?=]?)/) { send($1) }
end