diff options
author | José Valim <jose.valim@gmail.com> | 2009-12-22 08:26:00 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-12-22 08:26:00 +0100 |
commit | 4b8330d2d50ae4de14dd43ffbea4d91804553140 (patch) | |
tree | 8d925e361688cf09ab6e3fe8df6b9609a69ffa83 /railties/test/initializer | |
parent | 5f34421c77b4cd873baadbbca877a93de5a4d602 (diff) | |
parent | 8e48a5ef0ca488b2264acd2b38bdae14970c011f (diff) | |
download | rails-4b8330d2d50ae4de14dd43ffbea4d91804553140.tar.gz rails-4b8330d2d50ae4de14dd43ffbea4d91804553140.tar.bz2 rails-4b8330d2d50ae4de14dd43ffbea4d91804553140.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'railties/test/initializer')
-rw-r--r-- | railties/test/initializer/initialize_i18n_test.rb | 11 | ||||
-rw-r--r-- | railties/test/initializer/path_test.rb | 8 |
2 files changed, 9 insertions, 10 deletions
diff --git a/railties/test/initializer/initialize_i18n_test.rb b/railties/test/initializer/initialize_i18n_test.rb index 076816d73b..472566378d 100644 --- a/railties/test/initializer/initialize_i18n_test.rb +++ b/railties/test/initializer/initialize_i18n_test.rb @@ -7,16 +7,15 @@ module InitializerTests def setup build_app boot_rails - require "rails" end # test_config_defaults_and_settings_should_be_added_to_i18n_defaults test "i18n config defaults and settings should be added to i18n defaults" do - Rails::Initializer.run do |c| - c.root = app_path - c.i18n.load_path << "my/other/locale.yml" - end - Rails.initialize! + add_to_config <<-RUBY + config.root = "#{app_path}" + config.i18n.load_path << "my/other/locale.yml" + RUBY + require "#{app_path}/config/environment" #{RAILS_FRAMEWORK_ROOT}/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml assert_equal %W( diff --git a/railties/test/initializer/path_test.rb b/railties/test/initializer/path_test.rb index 1b58a58555..fa66ebcd83 100644 --- a/railties/test/initializer/path_test.rb +++ b/railties/test/initializer/path_test.rb @@ -7,14 +7,14 @@ class PathsTest < Test::Unit::TestCase build_app boot_rails require "rails" - Rails::Initializer.run do |config| - config.root = app_path + add_to_config <<-RUBY + config.root = "#{app_path}" config.frameworks = [:action_controller, :action_view, :action_mailer, :active_record] config.after_initialize do ActionController::Base.session_store = nil end - end - Rails.initialize! + RUBY + require "#{app_path}/config/environment" @paths = Rails.application.config.paths end |