From 4eec5f4fbb995ce665cb82367cc3965e74147b19 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Wed, 14 Mar 2007 23:27:28 +0000 Subject: Update Dependencies to ignore constants inherited from ancestors. Closes #6951. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/module_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/test/core_ext') diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index bbf6dd1640..884b44030c 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -1,10 +1,14 @@ require File.dirname(__FILE__) + '/../abstract_unit' module One + Constant1 = "Hello World" + Constant2 = "What's up?" end class Ab include One + Constant1 = "Hello World" # Will have different object id than One::Constant1 + Constant3 = "Goodbye World" end module Xy @@ -91,6 +95,10 @@ class ModuleTest < Test::Unit::TestCase assert_equal [Yz::Zy, Yz, Object], Yz::Zy::Cd.parents assert_equal [Yz, Object], Yz::Zy.parents end + + def test_local_constants + assert_equal %w(Constant1 Constant3), Ab.local_constants.sort + end def test_as_load_path assert_equal 'yz/zy', Yz::Zy.as_load_path -- cgit v1.2.3