diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-05-26 22:17:08 -0400 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-05-26 22:17:08 -0400 |
commit | 30169e6ea53176e2fb4eb3b89d4faa93caff79b4 (patch) | |
tree | 49f0f02b07c8b7694b5bc7f4e8d51e024eb3c925 /activesupport/test/core_ext | |
parent | 0a571e4ad416a72a5827d4bcca5e4f6e8920ec93 (diff) | |
download | rails-30169e6ea53176e2fb4eb3b89d4faa93caff79b4.tar.gz rails-30169e6ea53176e2fb4eb3b89d4faa93caff79b4.tar.bz2 rails-30169e6ea53176e2fb4eb3b89d4faa93caff79b4.zip |
Add test for `delegate_missing_to` where method doesn't exist
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 1f84e11529..566f29b470 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -367,6 +367,14 @@ class ModuleTest < ActiveSupport::TestCase assert_match(/undefined method `private_name' for/, e.message) end + def test_delegate_to_missing_does_not_delegate_to_fake_methods + e = assert_raises(NoMethodError) do + DecoratedReserved.new(@david).my_fake_method + end + + assert_match(/undefined method `my_fake_method' for/, e.message) + end + def test_parent assert_equal Yz::Zy, Yz::Zy::Cd.parent assert_equal Yz, Yz::Zy.parent |