# Test unit results display for every rake task

**URL:** <https://www.ruby-forum.com/t/test-unit-results-display-for-every-rake-task/193542>\
**Category:** Rails\
**Created:** [August 19, 2010, 12:39pm UTC](https://www.ruby-forum.com/t/test-unit-results-display-for-every-rake-task/193542 "2010-08-19T12:39:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stewart](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Stewart](https://www.ruby-forum.com/u/Stewart)\
**Post date:** [August 19, 2010, 12:39pm UTC](https://www.ruby-forum.com/t/test-unit-results-display-for-every-rake-task/193542/1 "2010-08-19T12:39:35Z")

</div>

I have not noticed this before but its a little strage. Every time I  
run a rake task the results of a test suite are displayed. EG

~/Documents/City Uni Work/Final Project/code/server (master)$ rake  
db:drop  
(in /Users/stewartmatheson/Documents/City Uni Work/Final Project/code/  
server)  
Loaded suite /Users/stewartmatheson/rails3install/bin/rake  
Started

Finished in 0.000193 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

Strange right… I decided to roll a testapp to make sure it was not  
something to do with my rails installation. Its not.

~/code/rails/testapp $ rake db:create  
(in /Users/stewartmatheson/code/rails/testapp)  
testapp\_development already exists  
~/code/rails/testapp $ rake db:migrate  
(in /Users/stewartmatheson/code/rails/testapp)  
~/code/rails/testapp $ rake test:units  
(in /Users/stewartmatheson/code/rails/testapp)  
~/code/rails/testapp $

Does anyone have any idea why each rake task is loading test::unit ?  
Not a biggie but just had me a bit puzzled.

---

<div class="post-metadata">

**Author:** ![Stewart](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Stewart](https://www.ruby-forum.com/u/Stewart)\
**Post date:** [August 19, 2010, 3:18pm UTC](https://www.ruby-forum.com/t/test-unit-results-display-for-every-rake-task/193542/2 "2010-08-19T15:18:16Z")

</div>

You’re loading the test environment. Somewhere you have RAILS\_ENV=test  
or ENV[“RAILS\_ENV”] = “test” or it’s been exported to your shell  
environment for some reason.

Jason

---

<div class="post-metadata">

**Author:** ![Stewart](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Stewart](https://www.ruby-forum.com/u/Stewart)\
**Post date:** [August 19, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/test-unit-results-display-for-every-rake-task/193542/3 "2010-08-19T15:32:50Z")

</div>

Stewart wrote:

> I have not noticed this before but its a little strage. Every time I  
> run a rake task the results of a test suite are displayed. EG
> 
> Does anyone have any idea why each rake task is loading test::unit ?  
> Not a biggie but just had me a bit puzzled.

When you start your console does it tell you “Loading test environment”?  
And if so, interesting that you’ve been able to develop / test at all  
without some major issues.

As Jason mentioned it seems like ENV set. Does echo RAILS\_ENV yield  
anything?
