From f35631d46610ac62d57743bdb5f71a0039b1cf78 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Tue, 19 Mar 2019 11:56:53 -0700 Subject: Prefer render template: in tests Many tests were using `render file:`, but were only testing the behaviour of `render template:` (file: just allows more paths/ is less secure then template:). The reason for so many `render file:` is probably that they were the old default. This commit replaces `render file:` with `render template:` anywhere the test wasn't specifically interested in using `render file:`. --- actionview/test/fixtures/test/hello.builder | 2 +- actionview/test/fixtures/test/layout_render_file.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionview/test/fixtures/test') diff --git a/actionview/test/fixtures/test/hello.builder b/actionview/test/fixtures/test/hello.builder index b8ab17ad5b..4c34ee85f0 100644 --- a/actionview/test/fixtures/test/hello.builder +++ b/actionview/test/fixtures/test/hello.builder @@ -1,4 +1,4 @@ xml.html do xml.p "Hello #{@name}" - xml << render(file: "test/greeting") + xml << render(template: "test/greeting") end diff --git a/actionview/test/fixtures/test/layout_render_file.erb b/actionview/test/fixtures/test/layout_render_file.erb index 2f8e921c5f..0477743dc4 100644 --- a/actionview/test/fixtures/test/layout_render_file.erb +++ b/actionview/test/fixtures/test/layout_render_file.erb @@ -1,2 +1,2 @@ <% content_for :title do %>title<% end -%> -<%= render :file => 'layouts/yield' -%> \ No newline at end of file +<%= render template: 'layouts/yield' -%> -- cgit v1.2.3