Question

Ever since I created this Rails 3.2.3 project to use MiniTest, I have been receiving these messages at the rake command line:

Loaded Suite test/factories,test/helpers,test,test/models,test/requests

Started at 2012-05-22 10:04:01 -0400 w/ seed 45382.

Finished in 0.000229 seconds.

0 tests, 0 passed, 0 failures, 0 errors, 0 skips, 0 assertions

Which is strange in itself, since I have several tests defined and they run fine. The messages above are superfluous, and they are confusing. How can I get rid of them?

Was it helpful?

Solution

Something is loading the autorun file in test/unit. Once that file gets loaded, an exit handler gets setup that will print out the number of tests that have been run at the end of the process.

To fix it you need to identify which gem is causing the autorun file to be loaded, and to stop requiring it automatically in your Gemfile.

In my case, the "culprit" was nutrasuite. To fix it I edited the Gemfile so that nutrasuite was added like this:

gem "nutrasuite", :require => false

You'll need to make sure that whichever library is causing it is required in your test_helper.rb file, but that's really how it should be setup anyway.

You can identify what's causing the problem via a process of trial and error. Hope that helps...

OTHER TIPS

You can also move it to its own group.

group :test do
  gem 'nutrasuite'
end

In my case, it was because I had minitest loading from the gemfile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top