From 82b9b151ffde44305d67744c0bfd9bb5505f6fbe Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Fri, 6 Nov 2009 17:21:39 -0800 Subject: Refactor plugins --- railties/test/initializer/initialize_i18n_test.rb | 42 +++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'railties/test/initializer/initialize_i18n_test.rb') diff --git a/railties/test/initializer/initialize_i18n_test.rb b/railties/test/initializer/initialize_i18n_test.rb index d664f96ad1..076816d73b 100644 --- a/railties/test/initializer/initialize_i18n_test.rb +++ b/railties/test/initializer/initialize_i18n_test.rb @@ -30,27 +30,27 @@ module InitializerTests end test "i18n finds locale files in engines" do - app_file "vendor/plugins/engine/init.rb", "" - app_file "vendor/plugins/engine/app/models/hellos.rb", "class Hello ; end" - app_file "vendor/plugins/engine/lib/omg.rb", "puts 'omg'" - app_file "vendor/plugins/engine/config/locales/en.yml", "hello:" - - Rails::Initializer.run do |c| - c.root = app_path - c.i18n.load_path << "my/other/locale.yml" - end - Rails.initialize! - - #{RAILS_FRAMEWORK_ROOT}/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml - assert_equal %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 - #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml - #{app_path}/config/locales/en.yml - my/other/locale.yml - #{app_path}/vendor/plugins/engine/config/locales/en.yml - ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } + # app_file "vendor/plugins/engine/init.rb", "" + # app_file "vendor/plugins/engine/app/models/hellos.rb", "class Hello ; end" + # app_file "vendor/plugins/engine/lib/omg.rb", "puts 'omg'" + # app_file "vendor/plugins/engine/config/locales/en.yml", "hello:" + # + # Rails::Initializer.run do |c| + # c.root = app_path + # c.i18n.load_path << "my/other/locale.yml" + # end + # Rails.initialize! + # + # #{RAILS_FRAMEWORK_ROOT}/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml + # assert_equal %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 + # #{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_view/locale/en.yml + # #{app_path}/config/locales/en.yml + # my/other/locale.yml + # #{app_path}/vendor/plugins/engine/config/locales/en.yml + # ).map { |path| File.expand_path(path) }, I18n.load_path.map { |path| File.expand_path(path) } end end end \ No newline at end of file -- cgit v1.2.3