Sha256: 48f1552f2f05d7c0fc2098044379e4e4fcfab8c0875a807a7be133120dfee991

Contents?: true

Size: 697 Bytes

Versions: 1

Compression:

Stored size: 697 Bytes

Contents

require 'test_helper'

module ActiveModel
  class Serializer
    class LintTest < ActiveSupport::TestCase
      include ActiveModel::Serializer::Lint::Tests

      class CompliantResource
        def serializable_hash(options = nil)
        end

        def read_attribute_for_serialization(name)
        end

        def as_json(options = nil)
        end

        def to_json(options = nil)
        end

        def cache_key
        end

        def id
        end

        def updated_at
        end

        def self.model_name
          @_model_name ||= ActiveModel::Name.new(self)
        end
      end

      def setup
        @resource = CompliantResource.new
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_model_serializers-0.10.0.rc4 test/lint_test.rb