Skip to content
This repository
Browse code

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
Cezary Baginski authored April 02, 2009 josh committed April 02, 2009
1  actionpack/test/fixtures/test/backup_files/item.html.erb
... ...
@@ -0,0 +1 @@
  1
+The correct item.erb was loaded.
1  actionpack/test/fixtures/test/backup_files/item.html.erb.orig
... ...
@@ -0,0 +1 @@
  1
+This is  an editor backup file and should never be loaded!
6  actionpack/test/template/render_test.rb
@@ -255,6 +255,12 @@ def test_render_utf8_template
255 255
       assert_equal Encoding::UTF_8, result.encoding
256 256
     end
257 257
   end
  258
+
  259
+  def test_render_with_backup_files
  260
+    result = @view.render :file => "/test/backup_files/item"
  261
+    assert_equal "The correct item.erb was loaded.\n", result
  262
+  end
  263
+
258 264
 end
259 265
 
260 266
 module TemplatesSetupTeardown
2  actionpack/test/template/template_test.rb
@@ -19,6 +19,8 @@ def test_template_path_parsing
19 19
       t.assert_parses_template_path 'abc',                    :extension => nil, :format => nil, :name => nil
20 20
       t.assert_parses_template_path 'abc.xxx',                :extension => nil, :format => 'xxx', :name => 'abc'
21 21
       t.assert_parses_template_path 'abc.html.xxx',           :extension => nil, :format => 'xxx', :name => 'abc'
  22
+
  23
+      t.assert_parses_template_path 'abc.html.erb.orig',      :format => 'orig', :extension => nil
22 24
     end
23 25
   end
24 26
 

0 notes on commit 4442312

Please sign in to comment.
Something went wrong with that request. Please try again.