diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/railties/shared_tests.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index 31ba2eaca2..a162bdb66f 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -294,7 +294,7 @@ YAML boot_rails - assert_equal %W( + expected = %W( #{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activemodel/lib/active_model/locale/en.yml #{RAILS_FRAMEWORK_ROOT}/activerecord/lib/active_record/locale/en.yml @@ -302,7 +302,13 @@ YAML #{@plugin.path}/config/locales/en.yml #{app_path}/config/locales/en.yml #{app_path}/app/locales/en.yml - ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } + ).map { |path| File.expand_path(path) } + + actual = I18n.load_path.map { |path| File.expand_path(path) }.find_all do |p| + p =~ /^#{RAILS_FRAMEWORK_ROOT}/ || p =~ /^#{@plugin.path}/ || p =~ /^#{app_path}/ + end + + assert_equal expected, actual assert_equal "2", I18n.t(:foo) assert_equal "1", I18n.t(:bar) |