Update lib/minitest/reporters/default_reporter.rb

I had a problem with the following error when trying to run a test file individually from within RubyMine:

/Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/activesupport-3.2.9/lib/active_support/core_ext/time/calculations.rb:326:in `-': can't convert nil into an exact number (TypeError)




	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/activesupport-3.2.9/lib/active_support/core_ext/time/calculations.rb:326:in `minus_with_duration'




	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/activesupport-3.2.9/lib/active_support/core_ext/time/calculations.rb:337:in `minus_with_coercion'
	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporters/default_reporter.rb:139:in `after_test'
F	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporters/default_reporter.rb:41:in `pass'
a	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:77:in `public_send'
b	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:77:in `block in trigger_callback'
u	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:76:in `each'
l	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:76:in `trigger_callback'
o	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:61:in `record'
u	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:887:in `block in _run_suite'
s	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:876:in `map'
 	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:876:in `_run_suite'
t	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:30:in `_run_suite'
e	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:863:in `block in _run_suites'
s	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:863:in `map'
t	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:863:in `_run_suites'
s	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-reporters-0.13.1/lib/minitest/reporter_runner.rb:22:in `_run_suites'
 in 0.165924s, 36.1611 tests/s, 6.0269 assertions/s.
	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:836:in `_run_anything'




	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:1025:in `run_tests'
6 tests, 1 assertions, 0 failures, 0 errors, 0 skips	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:1012:in `block in _run'
	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:1011:in `each'
	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:1011:in `_run'
	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:1000:in `run'
	from /Users/mcowden/.rvm/gems/ruby-1.9.2-p290@ruby1.9/gems/minitest-4.1.0/lib/minitest/unit.rb:758:in `block in autorun'
Coverage report generated for Unit Tests to /Users/mcowden/Development/bna/bas/test/models/coverage. 0 / 0 LOC (0.0%) covered.
Add handling for when runner.test_start_time is nil

When running in an older version of minitest, our selenium
integration (based on MiniTest::Spec) does not call #before_test
before calling #print_test_with_time for the first time.
Defaulting test_start_time to Time.now does not seem to effect
the rest of the test run, and times are reported correctly.
Fix the test_start_time bug in all other reporters.
Bump version.
Make JUnitReporter compatible with Ruby < 1.9.3.

IO.write is a new method as of Ruby 1.9.3, so use File.open and << instead.
Bump version.
Wait until after teardown to invoke callbacks.
Bump version.
Add JUnitReporter to the list of reporters in the README
Remove 'see below' note from README since there doesn't seem to be anything below that's relevant to this line
Explicitly load the forwardable library
Bump version.
Require parallel-each to make it work
Only require ParallelEach for >= 4.2.
Use a monkey patch for (before|after)_test hooks.
Bump version.
Reporters count correctly when :teardown fails/errors.

When there is a failure or exception in a :teardown, ProgressReporter
was counting the test twice, resulting in a > 100% completion
percentage.

RubyMineReporter was counting the additional failure or error as a
separate test and logging a warning to the console.

* Add an :after_test callback to the reporters.
* Rename DefaultReporter's now-conflicting :after_test to
  :test_result.
* Both reporters report test completion status in after_test instead
  of in the various pass/fail/etc. methods.
Revert "Use a monkey patch for (before|after)_test hooks."

This reverts commit 865b608bd3e93de8914976920fddb402ae66d74f.

That commit doesn't fix the problem with mintest-3.5.0.
minitest <= 4.1.0 compatibility.

minitest-4.1.0 and earlier send record from _run_suite, which is after
all of the test lifecycle callbacks have happened.  To deal with this,
record now sends after_test on older versions of minitest, and
after_test checks for nil runners and returns early in that case.
Directly detect MiniTest version.