spec/holodeck/holodeck.rb in twilio-ruby-5.0.0.rc26 vs spec/holodeck/holodeck.rb in twilio-ruby-5.0.0
- old
+ new
@@ -19,14 +19,14 @@
def any?
@any
end
def ==(other)
- method.upcase == other.method.upcase &&
- url == other.url &&
- params == other.params &&
- data == other.data
+ method.casecmp(other.method.upcase).zero? &&
+ url == other.url &&
+ params == other.params &&
+ data == other.data
end
def to_s
"#<Holodeck::Request method:#{method} url:#{url} params:#{params} data:#{data}>"
end
@@ -41,19 +41,19 @@
def mock(response)
@response = response
end
- def request(host, port, method, url, params={}, data={}, headers={}, auth=nil, timeout=nil)
+ def request(host, port, method, url, params = {}, data = {}, headers = {}, auth = nil, _timeout = nil)
@requests << Request.new(
method: method,
url: url,
params: params,
data: data,
headers: headers,
auth: auth
)
- return @response
+ @response
end
def has_request?(request)
@requests.include?(request)
end