TwP/turn — pull request #77 by kenmazaika (2012-02-22 01:17:27+00:00)
Title: Make files ending with _test show up, even if they are in the test/units folder

Before the line of the test that was failing was being filtered out from the stacktrace if the test mode was unit. This was causing a stacktrace that was this:

/Users/testman/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit/assertions.rb:185:in `assert_equal'
/Users/testman/source/campaign_manager/test/unit/omg_test.rb:145:in `block in
/Users/testman/source/campaign_manager/app/models/omg.rb:145:in `in double_rainbows`

to be filtered to this:

/Users/testman/source/campaign_manager/app/models/omg.rb:145:in `in double_rainbows`

and not give what line of the test file the assertion or exception failed at. This was caused by the filter_backtrace method removing all the elements of the backtrace that are in the test/units directory (and not only the ones that were specific for rails infrastructure test directory like assertion.rb).

This change does the following:

- Adjust the regex, so if the user follows the rails convention of naming their test file ending with _test.rb, that part of the backtrace will not be filtered out.
- Add a unit test for this case. The current tests seemed to all shell out to call the executable directly. Since the test I wanted to add was at the level of the Reporter class, I made a new test file for this, because it didn't seem to belong with the other tests.

Let me know if there are any changes that I need to make before getting this merged into master.