aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-02-21 14:55:34 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2012-02-21 14:55:52 -0200
commit4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f (patch)
tree7d9c4558f8865eeeedf6ee070e59ba9ce6c1b54c /actionpack/test/template
parentb1229685c4329252cbdc44ac10d43fb633d01adb (diff)
downloadrails-4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f.tar.gz
rails-4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f.tar.bz2
rails-4eff6bc6dfeea3eed5d92af66bd73e6a2cb9b09f.zip
Restore lookup formats to the previous value after searching for the failing view
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/render_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index 4eb3754a50..fe013f2475 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -52,10 +52,11 @@ module RenderTestCases
end
def test_render_template_with_a_missing_partial_of_another_format
+ @view.lookup_context.freeze_formats([:html])
assert_raise ActionView::Template::Error, "Missing partial /missing with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder]}" do
- @view.lookup_context.freeze_formats([:html])
@view.render(:template => "with_format", :formats => [:json])
end
+ assert_equal [:html], @view.lookup_context.formats
end
def test_render_file_with_locale