From: Patrick Doyle Date: 2008-12-15T22:38:46+09:00 Subject: Re: Running a specific test in a test file. ------=_Part_34219_14413990.1229348776345 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, Dec 15, 2008 at 7:40 AM, Hunt Jon wrote: > I remember there was a way to run a specific test from a test file. > > ruby test_file.rb > > Runs the all the tests. How can I select one from this? > > Also is there any complete reference on this (which argument the ruby > command takes when running test files)? > > John > > Are you talking about a Ruby on Rails application? If so, try: $ cd test $ ruby unit/<>_test.rb If you want to run a specific test (that you have defined, say in mymodel.rb), you can run $ ruby unit/mymodel.rb -n test_min_is_less_than_max assuming you want to run the "min is less than max" text, also known as "test_min_is_less_than_max". At least, that's what works for me :-) --wpd ------=_Part_34219_14413990.1229348776345--