seattlerb/minitest — Issue #59: Minitest::filter_backtrace strips too much for tests run in ruby trunk
Author: drbrain
Created: 2011-10-11 23:29:26+00:00
State: open

When running tests in Ruby Trunk I see an error like this:

Line 82 of test_pipeline.rb doesn't raise an exception, it calls into Net::HTTP where it raises an error somewhere inside the library.

```
1) Error:
test_pipeline_retry(TestNetHttpPipeline):
Errno::EPIPE: Broken pipe
/Users/drbrain/Work/svn/ruby/trunk/test/net/http/test_pipeline.rb:82:in `block in test_pipeline_retry'
/Users/drbrain/Work/svn/ruby/trunk/test/net/http/utils.rb:11:in `start'
/Users/drbrain/Work/svn/ruby/trunk/test/net/http/test_pipeline.rb:81:in `test_pipeline_retry'
./test/runner.rb:15:in `

'
```

The root of the problem is that MINI_DIR is the same path as the library files when running tests using `make test` in ruby trunk.

Editing Test::Unit#puke (which calls Minitest::filter_backtrace directly) to remove the filtering entirely gives this output:

```
1) Error:
test_pipeline_retry(TestNetHttpPipeline):
Errno::EPIPE: Broken pipe
/Users/drbrain/Work/svn/ruby/trunk/lib/net/protocol.rb:199:in `write'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/protocol.rb:199:in `write0'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/protocol.rb:173:in `block in write'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/protocol.rb:190:in `writing'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/protocol.rb:172:in `write'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/http.rb:2349:in `write_header'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/http.rb:2197:in `exec'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/http.rb:1646:in `pipeline_send'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/http.rb:1419:in `pipeline'
/Users/drbrain/Work/svn/ruby/trunk/test/net/http/test_pipeline.rb:82:in `block in test_pipeline_retry'
/Users/drbrain/Work/svn/ruby/trunk/lib/net/http.rb:825:in `start'
/Users/drbrain/Work/svn/ruby/trunk/test/net/http/utils.rb:11:in `start'
/Users/drbrain/Work/svn/ruby/trunk/test/net/http/test_pipeline.rb:81:in `test_pipeline_retry'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:949:in `run'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit/testcase.rb:17:in `run'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:787:in `block in _run_suite'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:780:in `map'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:780:in `_run_suite'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:565:in `block in _run_suites'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:563:in `each'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:563:in `_run_suites'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:746:in `_run_anything'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:909:in `run_tests'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:896:in `block in _run'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:895:in `each'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:895:in `_run'
/Users/drbrain/Work/svn/ruby/trunk/lib/minitest/unit.rb:884:in `run'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:21:in `run'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:606:in `run'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:638:in `run'
/Users/drbrain/Work/svn/ruby/trunk/lib/test/unit.rb:642:in `run'
./test/runner.rb:15:in `

'
```