Skip to content

Commit ad22d2d

Browse files
Updates options as a named argument to a positional arguments
1 parent 2faed77 commit ad22d2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/active_resource/http_mock.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def initialize(responses)
6262
# @responses[Request.new(:post, path, nil, request_headers, options)] = Response.new(body || "", status, response_headers)
6363
# end
6464
module_eval <<-EOE, __FILE__, __LINE__ + 1
65-
def #{method}(path, request_headers = {}, body = nil, status = 200, response_headers = {}, options: {})
65+
def #{method}(path, request_headers = {}, body = nil, status = 200, response_headers = {}, options = {})
6666
request = Request.new(:#{method}, path, nil, request_headers, options)
6767
response = Response.new(body || "", status, response_headers)
6868

test/cases/http_mock_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class HttpMockTest < ActiveSupport::TestCase
195195

196196
test "omits query parameters from the URL when options[:omit_query_params] is true" do
197197
ActiveResource::HttpMock.respond_to do |mock|
198-
mock.get("/endpoint", {}, "Response", options: { omit_query_in_path: true })
198+
mock.get("/endpoint", {}, "Response", 200, {}, { omit_query_in_path: true })
199199
end
200200

201201
response = request(:get, "/endpoint?param1=value1&param2=value2")

0 commit comments

Comments
 (0)