Created
May 8, 2018 09:29
-
-
Save stevo/7c5270a244a476cb6be723c2e226e989 to your computer and use it in GitHub Desktop.
An opinionated guide to readable RSpec (part 2 of 2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stub_request(:get, 'https://hotels.cloudbeds.com/api/v1.1/getRoomTypes') { { | |
body: | |
{ | |
'success' => true, | |
'data' => [ | |
{ | |
'roomTypeID' => '713', | |
'propertyID' => '276', | |
'roomTypeName' => 'AAA', | |
'roomTypeNameShort' => 'AAA', | |
'roomTypeDescription' => 'asdfa', | |
'isPrivate' => false, | |
'maxGuests' => '1', | |
'adultsIncluded' => '1', | |
'childrenIncluded' => 0, | |
'roomsAvailable' => 3, | |
'roomRate' => 120, | |
'roomTypeUnits' => 10 | |
} | |
], | |
'count' => 1, | |
'total' => 1 | |
}.to_json | |
} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment