From 44c51fc9cc7a0cdcf8b657e1900eb141083ef683 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 16 Jan 2014 11:55:48 -0800 Subject: define the delegate methods on one line. fixes #13724 sup haters --- activesupport/test/core_ext/module_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activesupport/test') 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 -- cgit v1.2.3