class Adapter::ActiveModel

Public Class Methods

collection(options, response, _binding) click to toggle source
# File lib/rspec/api_helpers/adapter/active_model/adapter.rb, line 12
def collection(options, response, _binding)
  hashed_response = HashWithIndifferentAccess.new(JSON.parse(response.body))

  return Collection.new(options, hashed_response, _binding)
end
resource(options, response, _binding) click to toggle source
# File lib/rspec/api_helpers/adapter/active_model/adapter.rb, line 6
def resource(options, response, _binding)
  hashed_response = HashWithIndifferentAccess.new(JSON.parse(response.body))

  return Resource.new(options, hashed_response, _binding)
end