Created
October 10, 2015 07:39
-
-
Save chinloongtan/26bcf5046ce84f08dcfa 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/requests/json_helpers.rb | |
module Requests | |
module JsonHelpers | |
def json | |
@json ||= JSON.parse(response.body) rescue response.body | |
end | |
end | |
end | |
RSpec.configure do |config| | |
config.include Requests::JsonHelpers | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment