How to run a single test method

Is there a way of running a single test in the Ruby testrunner
environment? I currently run all of the tests in my test class and suite
with:

Test::Unit::UI::Console::TestRunner.run(TC_my_test)

or:

Test::Unit::UI::Console::TestRunner.run(TC_my_suite)

I would like to be able to run a single test method from TC_my_test. I
notice that JUnit has runSingleMethod but can't find an equivalent for
Ruby.

N.B. This has to be run from the Google Sketchup Ruby command line as I
am writing code in this environment. i.e. I have access to what is
effectively an irb interface but not the ruby command (where I could add
--name test_my_test for the test name).

Thanks for any help.

Julian

···

--
Posted via http://www.ruby-forum.com/.

I am using:

Test::Unit::UI::Console::TestRunner.run(TC_my_test.new('test_me'))

where test_me is the name of the single test you wish to execute.

···

On Oct 1, 2:55 am, Julian Gall <julian.g...@gmail.com> wrote:

Is there a way of running a single test in the Ruby testrunner
environment? I currently run all of the tests in my test class and suite
with:

Test::Unit::UI::Console::TestRunner.run(TC_my_test)

or:

Test::Unit::UI::Console::TestRunner.run(TC_my_suite)

I would like to be able to run a single test method from TC_my_test. I
notice that JUnit has runSingleMethod but can't find an equivalent for
Ruby.

N.B. This has to be run from the Google Sketchup Ruby command line as I
am writing code in this environment. i.e. I have access to what is
effectively an irb interface but not the ruby command (where I could add
--name test_my_test for the test name).

Thanks for any help.

Julian
--
Posted viahttp://www.ruby-forum.com/.

Dear unknown,

You are a genius! Thank you very much. That is just what I was looking
for.

Julian

···

--
Posted via http://www.ruby-forum.com/.