Sha256: 9a77a21bad156db4375dc53d0451d046a599ad01eb5ab06e689cd54e5e8afb99
Contents?: true
Size: 1.95 KB
Versions: 15
Compression:
Stored size: 1.95 KB
Contents
@ruby_api Feature: create double As ruby developer I want to be able to create doubles via client api So that interactions with rest-assured server are completely hidden from me Scenario: default options When I create a double: """ @double = RestAssured::Double.create(:fullpath => '/some/api') """ Then the following should be true: """ @double.verb.should == 'GET' @double.response_headers.should == {} @double.status.should == 200 @double.content.should == nil get @double.fullpath last_response.should be_ok """ Scenario: specify response headers When I create a double: """ @double = RestAssured::Double.create(:fullpath => '/some/api', :response_headers => { 'Content-Type2' => 'text/html' }) """ Then the following should be true: """ @double.response_headers.should == { 'Content-Type2' => 'text/html' } get @double.fullpath last_response.headers['Content-Type2'].should == 'text/html' """ Scenario: specify content When I create a double: """ @double = RestAssured::Double.create(:fullpath => '/some/api', :content => 'awesome') """ Then the following should be true: """ @double.content = 'awesome' get @double.fullpath last_response.body == 'awesome' """ Scenario: specify verb When I create a double: """ @double = RestAssured::Double.create(:fullpath => '/some/api', :verb => 'POST') """ Then the following should be true: """ @double.verb = 'POST' get @double.fullpath last_response.should_not be_ok post @double.fullpath last_response.should be_ok """ Scenario: specify status When I create a double: """ @double = RestAssured::Double.create(:fullpath => '/some/api', :status => 302) """ Then the following should be true: """ @double.status = 302 get @double.fullpath last_response.status == 302 """
Version data entries
15 entries across 15 versions & 1 rubygems