diff options
author | Marcin Olichwirowicz <olichwirowicz@gmail.com> | 2015-09-05 16:58:21 +0200 |
---|---|---|
committer | Marcin Olichwirowicz <olichwirowicz@gmail.com> | 2015-09-05 16:58:40 +0200 |
commit | 81bc771e7cccb8a43f067a89f721f83798e63483 (patch) | |
tree | 2ab0d3b2b2530ad296c34cc57df66c715ee7be0b /actionpack/test/dispatch/exception_wrapper_test.rb | |
parent | a8f4568f5396b68ae81eddc636604bb78bb6632a (diff) | |
download | rails-81bc771e7cccb8a43f067a89f721f83798e63483.tar.gz rails-81bc771e7cccb8a43f067a89f721f83798e63483.tar.bz2 rails-81bc771e7cccb8a43f067a89f721f83798e63483.zip |
Remove mocha from ActionPack tests
Diffstat (limited to 'actionpack/test/dispatch/exception_wrapper_test.rb')
-rw-r--r-- | actionpack/test/dispatch/exception_wrapper_test.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/actionpack/test/dispatch/exception_wrapper_test.rb b/actionpack/test/dispatch/exception_wrapper_test.rb index f37cce4d45..dfbb91c0ca 100644 --- a/actionpack/test/dispatch/exception_wrapper_test.rb +++ b/actionpack/test/dispatch/exception_wrapper_test.rb @@ -25,27 +25,29 @@ module ActionDispatch exception = TestError.new("lib/file.rb:42:in `index'") wrapper = ExceptionWrapper.new(nil, exception) - wrapper.expects(:source_fragment).with('lib/file.rb', 42).returns('foo') - - assert_equal [ code: 'foo', line_number: 42 ], wrapper.source_extracts + assert_called_with(wrapper, :source_fragment, ['lib/file.rb', 42], returns: 'foo') do + assert_equal [ code: 'foo', line_number: 42 ], wrapper.source_extracts + end end test '#source_extracts works with Windows paths' do exc = TestError.new("c:/path/to/rails/app/controller.rb:27:in 'index':") wrapper = ExceptionWrapper.new(nil, exc) - wrapper.expects(:source_fragment).with('c:/path/to/rails/app/controller.rb', 27).returns('nothing') - assert_equal [ code: 'nothing', line_number: 27 ], wrapper.source_extracts + assert_called_with(wrapper, :source_fragment, ['c:/path/to/rails/app/controller.rb', 27], returns: 'nothing') do + assert_equal [ code: 'nothing', line_number: 27 ], wrapper.source_extracts + end end test '#source_extracts works with non standard backtrace' do exc = TestError.new('invalid') wrapper = ExceptionWrapper.new(nil, exc) - wrapper.expects(:source_fragment).with('invalid', 0).returns('nothing') - assert_equal [ code: 'nothing', line_number: 0 ], wrapper.source_extracts + assert_called_with(wrapper, :source_fragment, ['invalid', 0], returns: 'nothing') do + assert_equal [ code: 'nothing', line_number: 0 ], wrapper.source_extracts + end end test '#application_trace returns traces only from the application' do |