Sha256: 71785ab3493d15456d662e5ee5f63b7ed320facdfaf2f1e26176b67f520806d0

Contents?: true

Size: 847 Bytes

Versions: 3

Compression:

Stored size: 847 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 errors
        end

        def self.human_attribute_name(attr, options = {})
        end

        def self.lookup_ancestors
        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

3 entries across 3 versions & 1 rubygems

Version Path
active_model_serializers-0.10.1 test/lint_test.rb
active_model_serializers-0.10.0 test/lint_test.rb
active_model_serializers-0.10.0.rc5 test/lint_test.rb