@@ -129,7 +129,6 @@ def render_fragment_changed_object_with_except_cache_enabled
129
129
def render_fragment_changed_object_with_relationship
130
130
comment = Comment . new ( { id : 1 , body : 'ZOMG A COMMENT' } )
131
131
comment2 = Comment . new ( { id : 1 , body : 'ZOMG AN UPDATED-BUT-NOT-CACHE-EXPIRED COMMENT' } )
132
- author = Author . new ( id : 1 , name : 'Joao Moura.' )
133
132
like = Like . new ( { id : 1 , likeable : comment , time : 3 . days . ago } )
134
133
135
134
generate_cached_serializer ( like )
@@ -215,14 +214,16 @@ def test_render_json_object_without_serializer
215
214
get :render_json_object_without_serializer
216
215
217
216
assert_equal 'application/json' , @response . content_type
218
- assert_equal ( { error : 'Result is Invalid' } ) . to_json , @response . body
217
+ expected_body = { error : 'Result is Invalid' }
218
+ assert_equal expected_body . to_json , @response . body
219
219
end
220
220
221
221
def test_render_json_array_object_without_serializer
222
222
get :render_json_array_object_without_serializer
223
223
224
224
assert_equal 'application/json' , @response . content_type
225
- assert_equal ( [ { error : 'Result is Invalid' } ] ) . to_json , @response . body
225
+ expected_body = [ { error : 'Result is Invalid' } ]
226
+ assert_equal expected_body . to_json , @response . body
226
227
end
227
228
228
229
def test_render_array_using_implicit_serializer
@@ -405,9 +406,9 @@ def use_adapter?
405
406
false
406
407
end
407
408
} . new
408
- assert_match /adapter: false/ , ( capture ( :stderr ) {
409
+ assert_match ( /adapter: false/ , ( capture ( :stderr ) {
409
410
controller . get_serializer ( Profile . new )
410
- } )
411
+ } ) )
411
412
end
412
413
413
414
def test_dont_warn_overridding_use_adapter_as_truthy_on_controller_instance
0 commit comments