Sha256: 741643be92d4211cb76095b879a57050237e8747dba525d7f87f18253e8a1a5a
Contents?: true
Size: 500 Bytes
Versions: 28
Compression:
Stored size: 500 Bytes
Contents
require 'active_resource' module RestAssured class MoreRequestsExpected < StandardError; end class Double < ActiveResource::Base def response_headers attributes[:response_headers].attributes end 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 end end
Version data entries
28 entries across 28 versions & 1 rubygems