diff options
Diffstat (limited to 'activesupport/test/core_ext/module_test.rb')
-rw-r--r-- | activesupport/test/core_ext/module_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index 9edd7cc7c0..1712b0649b 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -141,6 +141,20 @@ class ModuleTest < Test::Unit::TestCase assert_equal 0.0, nil_project.to_f end + def test_delegation_does_not_raise_error_when_removing_singleton_instance_methods + parent = Class.new do + def self.parent_method; end + end + + assert_nothing_raised do + child = Class.new(parent) do + class << self + delegate :parent_method, :to => :superclass + end + end + end + end + def test_parent assert_equal Yz::Zy, Yz::Zy::Cd.parent assert_equal Yz, Yz::Zy.parent |