You are here

unit test

Running tests in the command line on Ruby on Rails

I normally run the test suite for my Ruby on Rails projects using the Netbeans test interface.
 
Unfortunately this interface is only useful to run the whole suite. It does not offer (as it does for Java) the possibility to run a single test class or a single test from a test class.
 
When I need to this I just go to the command line and type:
 
ruby test/functional/accounts_controller_test.rb
 
But what if I need to run one single test from this test class?
No problem, it is very easy. Just type:
 

Subscribe to RSS - unit test