Sha256: 1674dc3727f137e7f37552904d76656f801190f64a3cd0af7f28a574fcb45b0a

Contents?: true

Size: 516 Bytes

Versions: 3

Compression:

Stored size: 516 Bytes

Contents

class Adapter
  class ActiveModel
    include RSpec::Matchers

    class << self
      def resource(options, response, _binding)
        hashed_response = HashWithIndifferentAccess.new(JSON.parse(response.body))

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

      def collection(options, response, _binding)
        hashed_response = HashWithIndifferentAccess.new(JSON.parse(response.body))

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspec-api_helpers-1.0.4 lib/rspec/api_helpers/adapter/active_model/adapter.rb
rspec-api_helpers-1.0.3 lib/rspec/api_helpers/adapter/active_model/adapter.rb
rspec-api_helpers-1.0.2 lib/rspec/api_helpers/adapter/active_model/adapter.rb