module Helpers | |
def parse_json(json_data) | |
JSON.parse(json_data, symbolize_names: true) | |
end | |
def response_body | |
JSON.parse(response.body, symbolize_names: true) | |
end | |
def response_object | |
OpenStruct.new(parsed_body) | |
end | |
def response_objects | |
JSON.parse(response.body, object_class: OpenStruct) | |
end | |
end | |
RSpec.configure do |config| | |
config.include Helpers | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment