Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Additional template render test for backup files [#2367 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
commit 44423126c6f6133a1d9cf1d0832b527e8711d40f 1 parent cad3e8b
@e2 e2 authored josh committed
View
1  actionpack/test/fixtures/test/backup_files/item.html.erb
@@ -0,0 +1 @@
+The correct item.erb was loaded.
View
1  actionpack/test/fixtures/test/backup_files/item.html.erb.orig
@@ -0,0 +1 @@
+This is an editor backup file and should never be loaded!
View
6 actionpack/test/template/render_test.rb
@@ -255,6 +255,12 @@ def test_render_utf8_template
assert_equal Encoding::UTF_8, result.encoding
end
end
+
+ def test_render_with_backup_files
+ result = @view.render :file => "/test/backup_files/item"
+ assert_equal "The correct item.erb was loaded.\n", result
+ end
+
end
module TemplatesSetupTeardown
View
2  actionpack/test/template/template_test.rb
@@ -19,6 +19,8 @@ def test_template_path_parsing
t.assert_parses_template_path 'abc', :extension => nil, :format => nil, :name => nil
t.assert_parses_template_path 'abc.xxx', :extension => nil, :format => 'xxx', :name => 'abc'
t.assert_parses_template_path 'abc.html.xxx', :extension => nil, :format => 'xxx', :name => 'abc'
+
+ t.assert_parses_template_path 'abc.html.erb.orig', :format => 'orig', :extension => nil
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.