Skip to content

Commit fbd8623

Browse files
Renames method clean_path to remove_query_params_from_path
1 parent ab591d6 commit fbd8623

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/active_resource/http_mock.rb

+6-3
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def initialize(method, path, body = nil, headers = {}, options = {})
285285

286286
def ==(req)
287287
if @options && @options[:omit_query_in_path]
288-
clean_path == req.clean_path && method == req.method && headers_match?(req)
288+
remove_query_params_from_path == req.remove_query_params_from_path && method == req.method && headers_match?(req)
289289
else
290290
path == req.path && method == req.method && headers_match?(req)
291291
end
@@ -295,8 +295,11 @@ def to_s
295295
"<#{method.to_s.upcase}: #{path} [#{headers}] (#{body})>"
296296
end
297297

298-
def clean_path
299-
path.split("?").first # Removes query parameters from the path
298+
# Removes query parameters from the path.
299+
#
300+
# @return [String] the path without query parameters
301+
def remove_query_params_from_path
302+
path.split("?").first
300303
end
301304

302305
private

0 commit comments

Comments
 (0)