spec/holodeck/holodeck.rb in twilio-ruby-5.40.1 vs spec/holodeck/holodeck.rb in twilio-ruby-5.40.2
- old
+ new
@@ -38,16 +38,16 @@
end
ANY = Request.new(any: true)
def initialize
- @response = nil
+ @responses = []
@requests = []
end
def mock(response)
- @response = response
+ @responses << response
end
def request(host, port, method, url, params = {}, data = {}, headers = {}, auth = nil, _timeout = nil)
@requests << Request.new(
method: method,
@@ -55,10 +55,10 @@
params: params,
data: data,
headers: headers,
auth: auth
)
- @response
+ @responses.shift
end
def has_request?(request)
@requests.include?(request)
end