Permalink
Browse files

Hack in env variable setting for Dependencies.mechanism

  • Loading branch information...
1 parent f3f5f40 commit 4b921a5bdf952061bca1d1eb9a0b05c4160cae5a @jeremy jeremy committed Mar 27, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/dependencies.rb
  2. +1 −0 activesupport/test/abstract_unit.rb
View
2 activesupport/lib/active_support/dependencies.rb
@@ -21,7 +21,7 @@ module Dependencies #: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,
View
1 activesupport/test/abstract_unit.rb
@@ -4,6 +4,7 @@
gem 'mocha', '>= 0.9.5'
require 'mocha'
+ENV['NO_RELOAD'] = '1'
$:.unshift "#{File.dirname(__FILE__)}/../lib"
require 'active_support'
require 'active_support/test_case'

0 comments on commit 4b921a5

Please sign in to comment.