aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-24 20:26:01 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-24 20:26:01 +0000
commite7219e9e2a17fad73a2eaca0ffc7f118894934d8 (patch)
tree816a3489c849d1778e2d80a3147768137c051c31 /activesupport/test
parent14d50e9da3bb67a881afc2aed2662b5c10005eec (diff)
downloadrails-e7219e9e2a17fad73a2eaca0ffc7f118894934d8.tar.gz
rails-e7219e9e2a17fad73a2eaca0ffc7f118894934d8.tar.bz2
rails-e7219e9e2a17fad73a2eaca0ffc7f118894934d8.zip
Introduce Dependencies.warnings_on_first_load setting. If true, enables warnings on first load of a require_dependency. Otherwise, loads without warnings. Disabled (set to false) by default.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/dependencies_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index b801ce6cf0..ab28c4668e 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -46,6 +46,7 @@ class DependenciesTest < Test::Unit::TestCase
def test_warnings_should_be_enabled_on_first_load
old_mechanism, Dependencies.mechanism = Dependencies.mechanism, :load
+ old_warnings, Dependencies.warnings_on_first_load = Dependencies.warnings_on_first_load, true
filename = "#{File.dirname(__FILE__)}/dependencies/check_warnings"
$check_warnings_load_count = 0
@@ -78,6 +79,7 @@ class DependenciesTest < Test::Unit::TestCase
assert Dependencies.loaded.include?(filename)
ensure
Dependencies.mechanism = old_mechanism
+ Dependencies.warnings_on_first_load = old_warnings
end
def test_mutual_dependencies_dont_infinite_loop