diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-09-21 14:57:24 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-09-21 14:57:24 -0300 |
commit | a294d8362bfb62b7133ad0799ae1327cd5ddd1e4 (patch) | |
tree | 477930041d5c42f2453178ab110c8455c6d702fe /actionpack/test/new_base/render_rjs_test.rb | |
parent | 378b02d3aa890cedabf1ef81c34a371dbbc52c25 (diff) | |
parent | e2d0b0ee61c5a8c2626abb5ac1029b48ec1965eb (diff) | |
download | rails-a294d8362bfb62b7133ad0799ae1327cd5ddd1e4.tar.gz rails-a294d8362bfb62b7133ad0799ae1327cd5ddd1e4.tar.bz2 rails-a294d8362bfb62b7133ad0799ae1327cd5ddd1e4.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/new_base/render_rjs_test.rb')
-rw-r--r-- | actionpack/test/new_base/render_rjs_test.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actionpack/test/new_base/render_rjs_test.rb b/actionpack/test/new_base/render_rjs_test.rb index eecc275b1e..7b76c54ab9 100644 --- a/actionpack/test/new_base/render_rjs_test.rb +++ b/actionpack/test/new_base/render_rjs_test.rb @@ -1,9 +1,7 @@ -require 'abstract_unit2' +require 'abstract_unit' module RenderRjs - class BasicController < ActionController::Base - self.view_paths = [ActionView::FixtureResolver.new( "render_rjs/basic/index.js.rjs" => "page[:customer].replace_html render(:partial => 'customer')", "render_rjs/basic/index_html.js.rjs" => "page[:customer].replace_html :partial => 'customer'", @@ -26,6 +24,14 @@ module RenderRjs class TestBasic < SimpleRouteCase testing BasicController + def setup + @old_locale = I18n.locale + end + + def teardown + I18n.locale = @old_locale + end + test "rendering a partial in an RJS template should pick the JS template over the HTML one" do get :index, "format" => "js" assert_response("$(\"customer\").update(\"JS Partial\");") @@ -40,6 +46,5 @@ module RenderRjs get :index_locale, "format" => "js" assert_response("$(\"customer\").update(\"Danish HTML Partial\");") end - end end |