diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2007-03-14 23:27:28 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2007-03-14 23:27:28 +0000 |
commit | 4eec5f4fbb995ce665cb82367cc3965e74147b19 (patch) | |
tree | b44ff95dc30372057dc47699423bad0c35c0a4b0 /activesupport/test/core_ext | |
parent | bbcfb9b625c4ed471fcf7c827b700ccb025e7dd9 (diff) | |
download | rails-4eec5f4fbb995ce665cb82367cc3965e74147b19.tar.gz rails-4eec5f4fbb995ce665cb82367cc3965e74147b19.tar.bz2 rails-4eec5f4fbb995ce665cb82367cc3965e74147b19.zip |
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
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/module_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |