# Rake test vs rake test RAILS\_ENV=test

**URL:** <https://www.ruby-forum.com/t/rake-test-vs-rake-test-rails-env-test/177187>\
**Category:** Rails\
**Created:** [October 13, 2009, 12:08am UTC](https://www.ruby-forum.com/t/rake-test-vs-rake-test-rails-env-test/177187 "2009-10-13T00:08:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ate50eggs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@ate50eggs](https://www.ruby-forum.com/u/ate50eggs)\
**Post date:** [October 13, 2009, 12:08am UTC](https://www.ruby-forum.com/t/rake-test-vs-rake-test-rails-env-test/177187/1 "2009-10-13T00:08:34Z")

</div>

Is it bad to invoke ‘rake test’ with RAILS\_ENV=test? I get  
significantly different results when I do or don’t. When I don’t  
include a RAILS\_ENV, the migration check is done against my  
development profile, but the tests seem to execute against the test  
profile. When I set RAILS\_ENV to test, the migration check is  
performed on the test profile, but only my functional tests are run  
(succesully) and then then it errors out with what looks like an empty  
call to the test loader.

C:/opt/ruby/186/bin/ruby.exe -I"lib;test" “C:/opt/ruby/186/lib/ruby/  
gems/1.8/gems/rake-0.8.7/lib/rake/rake\_test\_loader.rb”  
Errors running test:units!

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![ate50eggs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@ate50eggs](https://www.ruby-forum.com/u/ate50eggs)\
**Post date:** [October 13, 2009, 10:19am UTC](https://www.ruby-forum.com/t/rake-test-vs-rake-test-rails-env-test/177187/2 "2009-10-13T10:19:32Z")

</div>

Hi Nathan B.

I did not see any error.But why are you doing like this.No need to  
specify RAILS\_ENV=test The explanation is  
If execute from konsole

rake #This run all tests  
rake test:units #Run all unit tests only  
rake test:functionals #Run only functional tests

Sijo
