From fe4dd681b66f9f50ff1d9e6bbe28346f4e521241 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Thu, 19 Apr 2018 08:47:07 +0900 Subject: [PATCH] Fix render option to suppress deprecation warning > DEPRECATION WARNING: `render :text` is deprecated because it does not > actually render a `text/plain` response. Switch to `render plain: > 'plain text'` to render as `text/plain`, `render html: > 'HTML'` to render as `text/html`, or `render body: > 'raw'` to match the deprecated behavior and render with the default > Content-Type, which is `text/html`. Signed-off-by: Kenji Okimoto --- spec/controllers/application_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 236ec8e..d06fa74 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -6,7 +6,7 @@ describe DummyController do controller DummyController do skip_before_action :login_required def index - render :text => "Hello World" + render plain: "Hello World" end end