diff options
author | Prem Sichanugrist <s@sikac.hu> | 2015-07-17 21:48:00 -0400 |
---|---|---|
committer | Prem Sichanugrist <s@sikac.hu> | 2015-07-17 22:27:33 -0400 |
commit | 8cb8ce98d903929342e2ca3a54a07ab5196baf93 (patch) | |
tree | deae317ebeca2cb20b57e9ad9a8c0c36720c8d7f /actionview/test/actionpack/abstract | |
parent | 0db98b3ec8226042a5c3400d594d803abb5b169f (diff) | |
download | rails-8cb8ce98d903929342e2ca3a54a07ab5196baf93.tar.gz rails-8cb8ce98d903929342e2ca3a54a07ab5196baf93.tar.bz2 rails-8cb8ce98d903929342e2ca3a54a07ab5196baf93.zip |
Stop using deprecated `render :text` in test
This will silence deprecation warnings.
Most of the test can be changed from `render :text` to render `:plain`
or `render :body` right away. However, there are some tests that needed
to be fixed by hand as they actually assert the default Content-Type
returned from `render :body`.
Diffstat (limited to 'actionview/test/actionpack/abstract')
-rw-r--r-- | actionview/test/actionpack/abstract/layouts_test.rb | 4 | ||||
-rw-r--r-- | actionview/test/actionpack/abstract/render_test.rb | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/actionview/test/actionpack/abstract/layouts_test.rb b/actionview/test/actionpack/abstract/layouts_test.rb index a6786d9b6b..80bc665b0a 100644 --- a/actionview/test/actionpack/abstract/layouts_test.rb +++ b/actionview/test/actionpack/abstract/layouts_test.rb @@ -52,7 +52,7 @@ module AbstractControllerTests end def overwrite_skip - render :text => "Hello text!" + render plain: "Hello text!" end end @@ -371,7 +371,7 @@ module AbstractControllerTests test "layout for anonymous controller" do klass = Class.new(WithString) do def index - render :text => 'index', :layout => true + render plain: 'index', layout: true end end diff --git a/actionview/test/actionpack/abstract/render_test.rb b/actionview/test/actionpack/abstract/render_test.rb index d09f91c1e2..e5721d6416 100644 --- a/actionview/test/actionpack/abstract/render_test.rb +++ b/actionview/test/actionpack/abstract/render_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/deprecation' module AbstractController module Testing @@ -33,7 +34,7 @@ module AbstractController end def text - render :text => "With Text" + render plain: "With Text" end def default |