Sha256: d30f5cbc29a5e529ce541bc30a11c2e3f81470ff9a690040ba11b08121b81de8
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 KB
Contents
Feature: wait for requests on double to happen In order to know when it is a good time to verify requests on a double As test developer I want to be able to wait until specified number of requests happen Background: Given rest-assured is running locally: """ RestAssured::Client.config.server_address = 'http://localhost:9876' """ And I created a double: """ @double = RestAssured::Double.create(:fullpath => '/some/api') """ Scenario: succesfully wait for requests When I wait for 3 requests: """ @double.wait_for_requests(3) """ And that double gets requested 3 times Then it should let me through Scenario: wait for requests that never come When I wait for 3 requests: """ @double.wait_for_requests(3) """ And that double gets requested 2 times Then it should wait for 5 seconds (default timeout) And it should raise MoreRequestsExpected error after with the following message: """ Expected 3 requests. Got 2. """ Scenario: custom timeout When I wait for 3 requests: """ @double.wait_for_requests(3, :timeout => 3) """ And that double gets requested 2 times Then it should wait for 3 seconds
Version data entries
3 entries across 3 versions & 1 rubygems