Now, the ruby bat.rb -n <test name> is really useful. It allows the
execution of a single test within the test case. For running tests (and
debugging) on the command line, it would be useful to list all the tests
in the suite. Then, one could use the -n flag to run the one of
interest.
Now the question...
If one wanted to modify the autorunner.rb, how would one iterate through
the tests in the test case? This code only lists the TC name. How does
one list the individual test cases?
o.on('-l', '--list', 'List the tests to run.'){ @collector[self].tests.each { |tc| puts "#{tc.name}" }
exit
}
Now, the ruby bat.rb -n <test name> is really useful. It allows the
execution of a single test within the test case. For running tests (and
debugging) on the command line, it would be useful to list all the tests
in the suite. Then, one could use the -n flag to run the one of
interest.
Now the question...
If one wanted to modify the autorunner.rb, how would one iterate through
the tests in the test case? This code only lists the TC name. How does
one list the individual test cases?
o.on('-l', '--list', 'List the tests to run.'){ @collector[self].tests.each { |tc| puts "#{tc.name}" }
exit
}
--
Posted via http://www.ruby-forum.com/\.