diff options
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 2 | ||||
-rw-r--r-- | activesupport/test/abstract_unit.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 61823fdeb2..ba515aaeec 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -21,7 +21,7 @@ module ActiveSupport #:nodoc: # Should we load files or require them? mattr_accessor :mechanism - self.mechanism = :load + self.mechanism = ENV['NO_RELOAD'] ? :require : :load # The set of directories from which we may automatically load files. Files # under these directories will be reloaded on each request in development mode, diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index a0c0c59e47..c997bcbb66 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -4,6 +4,7 @@ require 'test/unit' gem 'mocha', '>= 0.9.5' require 'mocha' +ENV['NO_RELOAD'] = '1' $:.unshift "#{File.dirname(__FILE__)}/../lib" require 'active_support' require 'active_support/test_case' |