From 0a5d3eb953bb274177c80f44835bb97e31c9f175 Mon Sep 17 00:00:00 2001 From: Jo Liss Date: Fri, 21 Sep 2012 16:41:27 +0200 Subject: [PATCH] Fix assertion for Ruby 1.8.7 --- test/serialization_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/serialization_test.rb b/test/serialization_test.rb index f2c1faea..d778de7b 100644 --- a/test/serialization_test.rb +++ b/test/serialization_test.rb @@ -214,7 +214,8 @@ class RenderJsonTest < ActionController::TestCase def test_render_json_with_callback get :render_json_hello_world_with_callback assert_equal 'alert({"hello":"world"})', @response.body - assert_match %r(application/json|text/javascript), @response.content_type + # For JSONP, Rails 3 uses application/json, but Rails 4 uses text/javascript + assert_match %r(application/json|text/javascript), @response.content_type.to_s end def test_render_json_with_custom_content_type