diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-10-14 21:21:09 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-10-14 21:21:09 +0000 |
commit | a442e6dbdfef4b77ba6ff6ceaa99471a69dadf6b (patch) | |
tree | 1585b94182cf8ea376abd26af56d60b7de5540db /railties | |
parent | 9285f6c7ae3e4addf940b033713e6d0e09ae1540 (diff) | |
download | rails-a442e6dbdfef4b77ba6ff6ceaa99471a69dadf6b.tar.gz rails-a442e6dbdfef4b77ba6ff6ceaa99471a69dadf6b.tar.bz2 rails-a442e6dbdfef4b77ba6ff6ceaa99471a69dadf6b.zip |
Clean-up fix a bit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 0e786dfa5d..dd87ca7070 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -36,7 +36,7 @@ module Rails load_environment initialize_database - initialize_fixture_settings if configuration.environment == 'test' + initialize_fixture_settings initialize_logger initialize_framework_logging initialize_framework_views @@ -102,12 +102,14 @@ module Rails end def initialize_fixture_settings - return unless configuration.frameworks.include?(:active_record) + return if configuration.environment == 'test' || !configuration.frameworks.include?(:active_record) + require 'test/unit' require 'active_record/fixtures' + Test::Unit::TestCase.use_transactional_fixtures = configuration.transactional_fixtures - Test::Unit::TestCase.use_instantiated_fixtures = configuration.instantiated_fixtures - Test::Unit::TestCase.pre_loaded_fixtures = configuration.pre_loaded_fixtures + Test::Unit::TestCase.use_instantiated_fixtures = configuration.instantiated_fixtures + Test::Unit::TestCase.pre_loaded_fixtures = configuration.pre_loaded_fixtures end def initialize_logger @@ -198,7 +200,7 @@ module Rails self.whiny_nils = default_whiny_nils self.database_configuration_file = default_database_configuration_file self.transactional_fixtures = default_transactional_fixtures - self.instantiated_fixtures = default_use_instantiated_fixtures + self.instantiated_fixtures = default_instantiated_fixtures self.pre_loaded_fixtures = default_pre_loaded_fixtures for framework in default_frameworks @@ -297,7 +299,7 @@ module Rails true end - def default_use_instantiated_fixtures + def default_instantiated_fixtures false end |