title: 'rake test' for minitest aborts in the middle
body: <p>I have a Rakefile to run all my minitest tests under <code>tests/</code>:</p>
  
  <pre><code>require 'rake'
  require 'rake/testtask'
  
  task :test do
    Rake::TestTask.new do |t|
      t.pattern = 'tests/**/*_test.rb'
      t.verbose = true
    end
  end
  
  task default: :test
  </code></pre>
  
  <p>I have required <code>minitest/autorun</code> in all my test files.</p>
  
  <p>When I run <code>bundle exec rake</code>, rake aborts randomly in the middle with <code>rake aborted</code>:</p>
  
  <pre><code>☁  fuel [master] ⚡ bundle exec rake
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/bin/ruby -I"lib" -I"/Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0" "/Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/rake_test_loader.rb" "tests/**/*_test.rb"
  Connecting to test database
  Run options: --seed 43993
  
  # Running:
  
  ...................F...F.............................................rake aborted!
  Command failed with status (1): [ruby -I"lib" -I"/Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0" "/Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/rake_test_loader.rb" "tests/**/*_test.rb" ]
  /Users/leninraj/.rvm/gems/ruby-2.2.3@fuel-app/bin/ruby_executable_hooks:15:in `eval'
  /Users/leninraj/.rvm/gems/ruby-2.2.3@fuel-app/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  Tasks: TOP =&gt; default =&gt; test
  (See full trace by running task with --trace)
  
  ☁  fuel [master] ⚡ bundle show rake
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/rake-10.4.2
  </code></pre>
  
  <p>Even with --trace option, there is no useful info about which test is aborting the runner.</p>
  
  <p>Here is the full stack trace when running with <code>--trace option</code>:</p>
  
  <pre><code>...........................................................F..........................................rake aborted!
  Command failed with status (1): [ruby -I"lib" -I"/Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0" "/Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/rake_test_loader.rb" "tests/**/*_test.rb" ]
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/testtask.rb:108:in `block (3 levels) in define'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils.rb:57:in `call'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils.rb:57:in `sh'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils_ext.rb:37:in `sh'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils.rb:96:in `ruby'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils_ext.rb:37:in `ruby'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/testtask.rb:104:in `block (2 levels) in define'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/file_utils_ext.rb:58:in `verbose'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/testtask.rb:100:in `block in define'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240:in `call'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:235:in `each'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:201:in `block in invoke_prerequisites'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:199:in `each'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:199:in `invoke_prerequisites'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:178:in `block in invoke_with_call_chain'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:106:in `each'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rake/application.rb:75:in `run'
  /Users/leninraj/.rvm/rubies/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake:33:in `&lt;top (required)&gt;'
  /Users/leninraj/.rvm/gems/ruby-2.2.3@fuel-app/bin/rake:23:in `load'
  /Users/leninraj/.rvm/gems/ruby-2.2.3@fuel-app/bin/rake:23:in `&lt;main&gt;'
  /Users/leninraj/.rvm/gems/ruby-2.2.3@fuel-app/bin/ruby_executable_hooks:15:in `eval'
  /Users/leninraj/.rvm/gems/ruby-2.2.3@fuel-app/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  Tasks: TOP =&gt; default =&gt; test
  </code></pre>
  
  <p>What could be the reason? How to find which test is aborting the runner?</p>