From 20ad04e5fcfd5b972bfffb6c47b44646c41b8a82 Mon Sep 17 00:00:00 2001 From: Genadi Samokovarov Date: Mon, 3 Nov 2014 22:59:45 +0200 Subject: Rename #source_extract to #source_extracts in ExceptionWrapper It returns multiple source extracts since 1ed264bc. Also cleaned its result structure, as we no longer need the file in a code extract. --- actionpack/test/dispatch/exception_wrapper_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/exception_wrapper_test.rb b/actionpack/test/dispatch/exception_wrapper_test.rb index 57292d3191..d7408164ba 100644 --- a/actionpack/test/dispatch/exception_wrapper_test.rb +++ b/actionpack/test/dispatch/exception_wrapper_test.rb @@ -25,13 +25,13 @@ module ActionDispatch @environment = { 'action_dispatch.backtrace_cleaner' => cleaner } end - test '#source_extract fetches source fragments for every backtrace entry' do + test '#source_extracts fetches source fragments for every backtrace entry' do exception = TestError.new("lib/file.rb:42:in `index'") wrapper = ExceptionWrapper.new({}, exception) wrapper.expects(:source_fragment).with('lib/file.rb', 42).returns('foo') - assert_equal [ code: 'foo', file: 'lib/file.rb', line_number: 42 ], wrapper.source_extract + assert_equal [ code: 'foo', line_number: 42 ], wrapper.source_extracts end -- cgit v1.2.3