Created
March 15, 2016 12:16
-
-
Save hchood/3c1b590ff7015589a6d0 to your computer and use it in GitHub Desktop.
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
# spec/support/helpers/requests.rb | |
module Helpers | |
module Requests | |
def body | |
response.body | |
end | |
def json_value_at_path(path = '') | |
parse_json(body, path) | |
end | |
def api_version | |
1 | |
end | |
def accept_header | |
"application/vnd.authentication-demo-app.com; version=#{api_version}" | |
end | |
def accept_headers | |
{ 'Accept' => accept_header, | |
'Content-Type' => 'application/json' } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment