Browse files

Backed out of setting testing settings through initializer as that wo…

…uld break backwards compatibility

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent ccd18dc commit d72201e43801994ade896a9706f0960589e3e8a7 @dhh dhh committed Oct 15, 2005
Showing with 6 additions and 27 deletions.
  1. +6 −0 railties/helpers/test_helper.rb
  2. +0 −27 railties/lib/initializer.rb
View
6 railties/helpers/test_helper.rb
@@ -3,5 +3,11 @@
require 'test_help'
class Test::Unit::TestCase
+ # Turn off transactional fixtures if you're working with MyISAM tables in MySQL
+ self.use_transactional_fixtures = true
+
+ # Instantiated fixtures are slow, but give you @david where you otherwise would need people(:david)
+ self.use_instantiated_fixtures = false
+
# Add more helper methods to be used by all tests here...
end
View
27 railties/lib/initializer.rb
@@ -36,7 +36,6 @@ def process
load_environment
initialize_database
- initialize_fixture_settings
initialize_logger
initialize_framework_logging
initialize_framework_views
@@ -101,17 +100,6 @@ def initialize_database
ActiveRecord::Base.establish_connection
end
- def initialize_fixture_settings
- 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
- end
-
def initialize_logger
# if the environment has explicitly defined a logger, use it
return if defined?(RAILS_DEFAULT_LOGGER)
@@ -199,9 +187,6 @@ def initialize
self.breakpoint_server = default_breakpoint_server
self.whiny_nils = default_whiny_nils
self.database_configuration_file = default_database_configuration_file
- self.transactional_fixtures = default_transactional_fixtures
- self.instantiated_fixtures = default_instantiated_fixtures
- self.pre_loaded_fixtures = default_pre_loaded_fixtures
for framework in default_frameworks
self.send("#{framework}=", OrderedOptions.new)
@@ -294,18 +279,6 @@ def default_breakpoint_server
def default_whiny_nils
false
end
-
- def default_transactional_fixtures
- true
- end
-
- def default_instantiated_fixtures
- false
- end
-
- def default_pre_loaded_fixtures
- false
- end
end
end

0 comments on commit d72201e

Please sign in to comment.