aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-06-12 12:44:00 +0200
committerJosé Valim <jose.valim@gmail.com>2011-06-12 12:45:09 +0200
commit04407a7b8aa85021becdbd38580118f4116b2ad2 (patch)
tree92569a9c9c0c374d1b2c71aeedc4070c1bc425cf /railties/test/application
parentde757af8b0fc5b66a4c089b1506d498aa504af5e (diff)
downloadrails-04407a7b8aa85021becdbd38580118f4116b2ad2.tar.gz
rails-04407a7b8aa85021becdbd38580118f4116b2ad2.tar.bz2
rails-04407a7b8aa85021becdbd38580118f4116b2ad2.zip
Make i18n tests more robust.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/initializers/i18n_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb
index aa4db6e12a..8c2c079fb8 100644
--- a/railties/test/application/initializers/i18n_test.rb
+++ b/railties/test/application/initializers/i18n_test.rb
@@ -52,7 +52,7 @@ module ApplicationTests
end
test "locale files should be added to the load path" do
- app_file "config/another_locale.yml", ""
+ app_file "config/another_locale.yml", "en:\nfoo: ~"
add_to_config <<-RUBY
config.i18n.load_path << config.root.join("config/another_locale.yml").to_s
@@ -131,7 +131,7 @@ en:
# Fallbacks
test "not using config.i18n.fallbacks does not initialize I18n.fallbacks" do
- I18n.backend = Class.new { include I18n::Backend::Base }.new
+ I18n.backend = Class.new(I18n::Backend::Simple).new
load_app
assert_no_fallbacks
end
@@ -145,7 +145,7 @@ en:
test "config.i18n.fallbacks = true initializes I18n.fallbacks with default settings even when backend changes" do
I18n::Railtie.config.i18n.fallbacks = true
- I18n::Railtie.config.i18n.backend = Class.new { include I18n::Backend::Base }.new
+ I18n::Railtie.config.i18n.backend = Class.new(I18n::Backend::Simple).new
load_app
assert I18n.backend.class.included_modules.include?(I18n::Backend::Fallbacks)
assert_fallbacks :de => [:de, :en]