Sha256: eeb73496b5a5e5365bd665c7a98c5f43cb029664ca64e0adfc4b892fb5b7797a
Contents?: true
Size: 640 Bytes
Versions: 13
Compression:
Stored size: 640 Bytes
Contents
require 'test_helper' module ActiveModel class ArraySerializer class KeyFormatTest < Minitest::Test def test_array_serializer_pass_options_to_items_serializers array = [WebLog.new({ name: 'Name 1', display_name: 'Display Name 1'}), WebLog.new({ name: 'Name 2', display_name: 'Display Name 2'})] serializer = ArraySerializer.new(array, key_format: :lower_camel) expected = [{ name: 'Name 1', displayName: 'Display Name 1' }, { name: 'Name 2', displayName: 'Display Name 2' }] assert_equal expected, serializer.serializable_array end end end end
Version data entries
13 entries across 13 versions & 1 rubygems