diff options
Diffstat (limited to 'actionpack/test/controller/metal/renderers_test.rb')
-rw-r--r-- | actionpack/test/controller/metal/renderers_test.rb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/actionpack/test/controller/metal/renderers_test.rb b/actionpack/test/controller/metal/renderers_test.rb index 007866a559..7dc3dd6a6d 100644 --- a/actionpack/test/controller/metal/renderers_test.rb +++ b/actionpack/test/controller/metal/renderers_test.rb @@ -1,14 +1,20 @@ -require 'abstract_unit' -require 'active_support/core_ext/hash/conversions' +require "abstract_unit" +require "active_support/core_ext/hash/conversions" + +class MetalRenderingController < ActionController::Metal + include AbstractController::Rendering + include ActionController::Rendering + include ActionController::Renderers +end class MetalRenderingJsonController < MetalRenderingController class Model def to_json(options = {}) - { a: 'b' }.to_json(options) + { a: "b" }.to_json(options) end def to_xml(options = {}) - { a: 'b' }.to_xml(options) + { a: "b" }.to_xml(options) end end @@ -29,14 +35,14 @@ class RenderersMetalTest < ActionController::TestCase def test_render_json get :one assert_response :success - assert_equal({ a: 'b' }.to_json, @response.body) - assert_equal 'application/json', @response.content_type + assert_equal({ a: "b" }.to_json, @response.body) + assert_equal "application/json", @response.content_type end def test_render_xml get :two assert_response :success assert_equal(" ", @response.body) - assert_equal 'text/plain', @response.content_type + assert_equal "text/plain", @response.content_type end end |