How to run a single test method using Unit::Test?

I tried:
ruby -I test test/unit/model_test.rb -n “the truth”
Loaded suite test/unit/model_test
Started
Finished in 0.000297873 seconds.
0 tests, 0 assertions, 0 failures, 0 errors

The following test is in the model_test.rb file:
test “the truth” do
assert true
end

Changing the name of the test (“the truth”) does not affect the
output: apparently it is not finding the test.
It does find the test file. Changing the file name throws an error.

How to run a single test method? (Not a single test file.)

Thanks!

On 11 December 2011 02:23, B7 [email protected] wrote:

I tried:
ruby -I test test/unit/model_test.rb -n “the truth”

No guarantees but try
-n test_the_truth

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs