From a442e6dbdfef4b77ba6ff6ceaa99471a69dadf6b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 14 Oct 2005 21:21:09 +0000 Subject: Clean-up fix a bit git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/initializer.rb | 14 ++++++++------ 1 file 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 -- cgit v1.2.3