From 4ea1753fc2bcbaca0a50073463ef4b020a2e3c5f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 26 Jul 2010 12:42:07 -0300 Subject: This is for making sure const_missing is triggered without warnings --- activesupport/test/autoloading_fixtures/loads_constant.rb | 3 ++- activesupport/test/dependencies_test.rb | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/activesupport/test/autoloading_fixtures/loads_constant.rb b/activesupport/test/autoloading_fixtures/loads_constant.rb index b5b80c46da..0b30dc8bca 100644 --- a/activesupport/test/autoloading_fixtures/loads_constant.rb +++ b/activesupport/test/autoloading_fixtures/loads_constant.rb @@ -1,4 +1,5 @@ module LoadsConstant end -RequiresConstant +# The _ = assignment is to prevent warnings +_ = RequiresConstant diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb index ec5116bff4..f98d823f00 100644 --- a/activesupport/test/dependencies_test.rb +++ b/activesupport/test/dependencies_test.rb @@ -220,11 +220,12 @@ class DependenciesTest < Test::Unit::TestCase $:.push(path) with_autoloading_fixtures do - RequiresConstant + # The _ = assignments are to prevent warnings + _ = RequiresConstant assert defined?(RequiresConstant) assert defined?(LoadedConstant) ActiveSupport::Dependencies.clear - RequiresConstant + _ = RequiresConstant assert defined?(RequiresConstant) assert defined?(LoadedConstant) end @@ -241,11 +242,12 @@ class DependenciesTest < Test::Unit::TestCase $:.push(path) with_autoloading_fixtures do - LoadsConstant + # The _ = assignments are to prevent warnings + _ = LoadsConstant assert defined?(LoadsConstant) assert defined?(LoadedConstant) ActiveSupport::Dependencies.clear - LoadsConstant + _ = LoadsConstant assert defined?(LoadsConstant) assert defined?(LoadedConstant) end -- cgit v1.2.3