Skip to content

Commit cf7f2ce

Browse files
committed
Fix JRuby 'warning: (...) interpreted as grouped expression'
1 parent 9a1efda commit cf7f2ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/action_controller/serialization_test.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,16 @@ def test_render_json_object_without_serializer
214214
get :render_json_object_without_serializer
215215

216216
assert_equal 'application/json', @response.content_type
217-
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
218219
end
219220

220221
def test_render_json_array_object_without_serializer
221222
get :render_json_array_object_without_serializer
222223

223224
assert_equal 'application/json', @response.content_type
224-
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
225227
end
226228

227229
def test_render_array_using_implicit_serializer

0 commit comments

Comments
 (0)