aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-04-22 17:16:28 -0700
committerYehuda Katz and Carl Lerche <wycats@gmail.com>2009-04-22 17:24:41 -0700
commit0a132c2fe13fb2b8d5dade9cf6abd70601376287 (patch)
treecf9194a0a9df3cf36e7a1ffbe8b8e16274c94ee9 /actionpack/test
parentb2d6fdae353be4fca41d7ac1839f30d9737162fd (diff)
downloadrails-0a132c2fe13fb2b8d5dade9cf6abd70601376287.tar.gz
rails-0a132c2fe13fb2b8d5dade9cf6abd70601376287.tar.bz2
rails-0a132c2fe13fb2b8d5dade9cf6abd70601376287.zip
Refactor ActionView::Path
* Decouple from ActionController and ActionMailer * Bring back localization support. * Prepare to decouple templates from the filesystem. * Prepare to decouple localization from ActionView * Fix ActionMailer to take advantage of ActionView::Path
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/abstract_controller/abstract_controller_test.rb4
-rw-r--r--actionpack/test/template/render_test.rb20
2 files changed, 10 insertions, 14 deletions
diff --git a/actionpack/test/abstract_controller/abstract_controller_test.rb b/actionpack/test/abstract_controller/abstract_controller_test.rb
index 918062c7db..f1dcb39ef1 100644
--- a/actionpack/test/abstract_controller/abstract_controller_test.rb
+++ b/actionpack/test/abstract_controller/abstract_controller_test.rb
@@ -139,10 +139,10 @@ module AbstractController
private
def self.layout(formats)
begin
- view_paths.find_by_parts(name.underscore, formats, "layouts")
+ view_paths.find_by_parts(name.underscore, {:formats => formats}t, "layouts")
rescue ActionView::MissingTemplate
begin
- view_paths.find_by_parts("application", formats, "layouts")
+ view_paths.find_by_parts("application", {:formats => formats}, "layouts")
rescue ActionView::MissingTemplate
end
end
diff --git a/actionpack/test/template/render_test.rb b/actionpack/test/template/render_test.rb
index 8843f6fdd7..7191df0dfd 100644
--- a/actionpack/test/template/render_test.rb
+++ b/actionpack/test/template/render_test.rb
@@ -29,23 +29,19 @@ module RenderTestCases
end
def test_render_file_with_localization
- pending do
- begin
- old_locale = I18n.locale
- I18n.locale = :da
- assert_equal "Hey verden", @view.render(:file => "test/hello_world")
- ensure
- I18n.locale = old_locale
- end
+ begin
+ old_locale = I18n.locale
+ I18n.locale = :da
+ assert_equal "Hey verden", @view.render(:file => "test/hello_world")
+ ensure
+ I18n.locale = old_locale
end
end
def test_render_file_with_dashed_locale
old_locale = I18n.locale
- pending do
- I18n.locale = :"pt-BR"
- assert_equal "Ola mundo", @view.render(:file => "test/hello_world")
- end
+ I18n.locale = :"pt-BR"
+ assert_equal "Ola mundo", @view.render(:file => "test/hello_world")
ensure
I18n.locale = old_locale
end