Sha256: de8f24ca2956677b9ffc1a5afcd96045e2dd1302de6820c285824fa1998c10da
Contents?: true
Size: 620 Bytes
Versions: 13
Compression:
Stored size: 620 Bytes
Contents
require 'test_helper' module ActiveModel class ArraySerializer class ExceptTest < Minitest::Test def test_array_serializer_pass_except_to_items_serializers array = [Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' }), Profile.new({ name: 'Name 2', description: 'Description 2', comments: 'Comments 2' })] serializer = ArraySerializer.new(array, except: [:description]) expected = [{ name: 'Name 1' }, { name: 'Name 2' }] assert_equal expected, serializer.serializable_array end end end end
Version data entries
13 entries across 13 versions & 1 rubygems