Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make i18n tests more robust.

  • Loading branch information...
commit edc0b2b80b555bea5d808108ca7d4a334ec71b0f 1 parent 7c4625a
@josevalim josevalim authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/test/application/initializers/i18n_test.rb
View
6 railties/test/application/initializers/i18n_test.rb
@@ -52,7 +52,7 @@ def assert_no_fallbacks
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 @@ class Foo < ActiveRecord::Base
# 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 @@ class Foo < ActiveRecord::Base
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]
Please sign in to comment.
Something went wrong with that request. Please try again.