@@ -36,7 +36,7 @@ def test_each_object_should_be_serialized_with_appropriate_serializer
3636 assert_kind_of PostSerializer , serializers . last
3737 assert_kind_of Post , serializers . last . object
3838
39- assert_equal serializers . last . custom_options [ :some ] , :options
39+ assert_equal :options , serializers . last . custom_options [ :some ]
4040 end
4141
4242 def test_serializer_option_not_passed_to_each_serializer
@@ -47,50 +47,50 @@ def test_serializer_option_not_passed_to_each_serializer
4747
4848 def test_root_default
4949 @serializer = collection_serializer . new ( [ @comment , @post ] )
50- assert_equal @serializer . root , nil
50+ assert_nil @serializer . root
5151 end
5252
5353 def test_root
5454 expected = 'custom_root'
5555 @serializer = collection_serializer . new ( [ @comment , @post ] , root : expected )
56- assert_equal @serializer . root , expected
56+ assert_equal expected , @serializer . root
5757 end
5858
5959 def test_root_with_no_serializers
6060 expected = 'custom_root'
6161 @serializer = collection_serializer . new ( [ ] , root : expected )
62- assert_equal @serializer . root , expected
62+ assert_equal expected , @serializer . root
6363 end
6464
6565 def test_json_key
66- assert_equal @serializer . json_key , 'comments'
66+ assert_equal 'comments' , @serializer . json_key
6767 end
6868
6969 def test_json_key_with_resource_with_name_and_no_serializers
7070 serializer = collection_serializer . new ( build_named_collection )
71- assert_equal serializer . json_key , 'me_resources'
71+ assert_equal 'me_resources' , serializer . json_key
7272 end
7373
7474 def test_json_key_with_resource_with_nil_name_and_no_serializers
7575 resource = [ ]
7676 resource . define_singleton_method ( :name ) { nil }
7777 serializer = collection_serializer . new ( resource )
78- assert_equal serializer . json_key , nil
78+ assert_nil serializer . json_key
7979 end
8080
8181 def test_json_key_with_resource_without_name_and_no_serializers
8282 serializer = collection_serializer . new ( [ ] )
83- assert_equal serializer . json_key , nil
83+ assert_nil serializer . json_key
8484 end
8585
8686 def test_json_key_with_root
8787 serializer = collection_serializer . new ( @resource , root : 'custom_root' )
88- assert_equal serializer . json_key , 'custom_roots'
88+ assert_equal 'custom_roots' , serializer . json_key
8989 end
9090
9191 def test_json_key_with_root_and_no_serializers
9292 serializer = collection_serializer . new ( build_named_collection , root : 'custom_root' )
93- assert_equal serializer . json_key , 'custom_roots'
93+ assert_equal 'custom_roots' , serializer . json_key
9494 end
9595 end
9696 end
0 commit comments