Class: RestAssured::Double

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/rest-assured/api/resources.rb

Instance Method Summary collapse

Instance Method Details

#response_headersObject



7
8
9
# File 'lib/rest-assured/api/resources.rb', line 7

def response_headers
  attributes[:response_headers].attributes
end

#wait_for_requests(n, opts = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/rest-assured/api/resources.rb', line 11

def wait_for_requests(n, opts = {})
  timeout = opts[:timeout] || 5

  timeout.times do
    sleep 1
    reload
    return if requests.count >= n
  end
  raise MoreRequestsExpected.new("Expected #{n} requests. Got #{requests.count}.")
end