Sha256: 3ec4ef036cc7d2e6221daaa5a07f52037bb3729cb9fb124ebb5d94502f064e25

Contents?: true

Size: 838 Bytes

Versions: 10

Compression:

Stored size: 838 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(_, _ = {})
        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

10 entries across 10 versions & 2 rubygems

Version Path
active_model_serializers-0.10.8 test/lint_test.rb
active_model_serializers-0.10.7 test/lint_test.rb
active_model_serializers-0.10.6 test/lint_test.rb
active_model_serializers-0.10.5 test/lint_test.rb
active_model_serializers-0.10.4 test/lint_test.rb
agi_active_model_serializers-0.10.9 test/lint_test.rb
agi_active_model_serializers-0.10.8 test/lint_test.rb
agi_active_model_serializers-0.10.7 test/lint_test.rb
active_model_serializers-0.10.3 test/lint_test.rb
active_model_serializers-0.10.2 test/lint_test.rb