lib/rack/app/test.rb in rack-app-6.0.0 vs lib/rack/app/test.rb in rack-app-6.1.0
- old
+ new
@@ -14,10 +14,10 @@
def __send_rack_app_request__(request_method, *args)
properties = args.select { |e| e.is_a?(Hash) }.reduce({}, &:merge!)
url = args.detect { |e| e.is_a?(String) } || properties.delete(:url)
mock_request = Rack::MockRequest.new(rack_app)
- request_env = Rack::App::Test::Utils.env_by(properties)
+ request_env = Rack::App::Test::Utils.env_by(url, properties)
return @last_response = mock_request.request(request_method.to_s.upcase, url, request_env)
end
Rack::App::Constants::HTTP::METHODS.each do |request_method_type|
define_method(request_method_type.to_s.downcase) do |*args|