Created
May 8, 2018 09:31
-
-
Save stevo/fc649b26b114431d664309fdd658862f 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
allow(ENV).to receive(:fetch).with('API_KEY') { '123' } | |
get '/v1/days', { 'Content-Type' => 'application/json', 'X-Api-Key' => api_key } | |
expect(JSON.parse(response.body)['data']).to include( | |
{ 'date' => '2018-04-20', 'sunset_at' => '19:47' }, | |
{ 'date' => '2018-04-21', 'sunset_at' => '19:48' }, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment