Open
Description
On a Rails 4.2 project using MiniTest which is the default test runner now:
$ bundle exec rake test:units
Run options: --seed 55356
# Running:
...................................................................................................................................................................................................................
Finished in 2.608524s, 80.8887 runs/s, 167.1444 assertions/s.
211 runs, 436 assertions, 0 failures, 0 errors, 0 skips
SimpleCov failed to recognize the test framework and/or suite used. Please specify manually using SimpleCov.command_name 'Unit Tests'.
Coverage report generated for Unknown Test Framework to /Data/Projects/portal/trunk/coverage. 938 / 1201 LOC (78.1%) covered.
bucket:trunk daniel$
The docs imply that the shell command is used for this:
SimpleCov tries to guess the name of the currently running test suite based upon the shell command the tests are running on. This should work fine for Unit Tests, RSpec, and Cucumber. If it fails, it will use the shell command that invoked the test suite as a command name.
Is the bundle exec
in my command-line confusing SimpleCov into not recognising the command? Because other than that, it seems pretty obvious that I'm running test:units
...
Versions of test-related stuff:
simplecov (0.7.1)
minitest (5.9.0)
ci_reporter_minitest (1.0.0)
mocha (1.1.0)
test/test_helper.rb
:
require 'simplecov'
SimpleCov.start 'rails'
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'mocha/mini_test'
class ActiveSupport::TestCase
# ... omitting additional methods we added to TestCase ...
end