# Execute unittests with rake in RadRails

**URL:** <https://www.ruby-forum.com/t/execute-unittests-with-rake-in-radrails/117533>\
**Category:** Rails\
**Created:** [October 17, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/execute-unittests-with-rake-in-radrails/117533 "2007-10-17T21:04:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![heyho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a183cd/32.png) [@heyho](https://www.ruby-forum.com/u/heyho)\
**Post date:** [October 17, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/execute-unittests-with-rake-in-radrails/117533/1 "2007-10-17T21:04:41Z")

</div>

Hi,

I’m absolutly new to Ruby on Rails and try to set up my development  
environment. I installed RadRails, created a project and generated my  
first model and controller. Now I want to execute my unittests with  
rake. I have the rudimental automatically created rakefile:

# Add your own tasks in files placed in lib/tasks ending in .rake,

# for example lib/tasks/capistrano.rake, and they will automatically be

available to Rake.

require(File.join(File.dirname( **FILE** ), ‘config’, ‘boot’))

require ‘rake’  
require ‘rake/testtask’  
require ‘rake/rdoctask’

require ‘tasks/rails’

And I have a test in test/unit/testname\_test.rb. I can execute this test  
manually with right mouseklick on it (in RadRails) --\> Execute as --\>  
Test::Unit Test. Now my - probably very simple to be answered -  
question: How do I execute this test via rake? Please tell me EVERY  
SINGLE STEP (every line of “code” and where I have to put it). Thank  
you!
