diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-16 11:57:03 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-16 11:57:03 -0800 |
commit | 060fbd6a88332ae5e3d8b9cf3d20559544b08693 (patch) | |
tree | 44d1076686961ae48a86ed9a8a51054438fb2da1 /activesupport/test | |
parent | f19ba681a80c0b0be604c58389ce2892c623d027 (diff) | |
parent | 44c51fc9cc7a0cdcf8b657e1900eb141083ef683 (diff) | |
download | rails-060fbd6a88332ae5e3d8b9cf3d20559544b08693.tar.gz rails-060fbd6a88332ae5e3d8b9cf3d20559544b08693.tar.bz2 rails-060fbd6a88332ae5e3d8b9cf3d20559544b08693.zip |
Merge branch 'master' into adequaterecord
* master:
define the delegate methods on one line. fixes #13724
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/module_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index 5b99fae411..4680fe5dfe 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -245,6 +245,16 @@ class ModuleTest < ActiveSupport::TestCase end end + def test_delegation_line_number + file, line = Someone.instance_method(:foo).source_location + assert_equal Someone::FAILED_DELEGATE_LINE, line + end + + def test_delegate_line_with_nil + file, line = Someone.instance_method(:bar).source_location + assert_equal Someone::FAILED_DELEGATE_LINE_2, line + end + def test_delegation_exception_backtrace someone = Someone.new("foo", "bar") someone.foo |