aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-12 10:44:35 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-12 11:15:11 -0800
commit31293ba9d33f5b5f62ee760a548b4f5438183f22 (patch)
tree8020d88ce86a9f3d5281e7518d1f3fbd6cc7780b /railties
parent16ae08fff0f16b3f0eb7757e01aabb02b257bd35 (diff)
downloadrails-31293ba9d33f5b5f62ee760a548b4f5438183f22.tar.gz
rails-31293ba9d33f5b5f62ee760a548b4f5438183f22.tar.bz2
rails-31293ba9d33f5b5f62ee760a548b4f5438183f22.zip
remove locales external to the system before assertion
Diffstat (limited to 'railties')
-rw-r--r--railties/test/railties/shared_tests.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb
index a162bdb66f..3eb79d57c8 100644
--- a/railties/test/railties/shared_tests.rb
+++ b/railties/test/railties/shared_tests.rb
@@ -294,7 +294,7 @@ YAML
boot_rails
- expected = %W(
+ expected_locales = %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
@@ -304,11 +304,11 @@ YAML
#{app_path}/app/locales/en.yml
).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
+ actual_locales = I18n.load_path.map { |path|
+ File.expand_path(path)
+ } & expected_locales # remove locales external to Rails
- assert_equal expected, actual
+ assert_equal expected_locales, actual_locales
assert_equal "2", I18n.t(:foo)
assert_equal "1", I18n.t(:bar)