Context: 1.8.2 on WinXP: I find myself often in a mode of making changes to
code and needing to drill down into specific tests with logging or
breakpoints. So I want an easy way to control which tests to run when in
that mode.
Which UI test runner is easily used with test/unit? I tried Tk assuming it
was 'built in'
require 'test/unit/ui/tk/testrunner'
and
Test::Unit::UI::Tk::TestRunner.run( TestMacros ) # at end of my test
class
And I got
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
Process ruby exited with code 3
Yes, specify the names of the test functions you want to run on the
command line:
./test_all.rb test_schneir_a
That was the first thing I tried, but it still ran all the tests. It could
be that command-line options only allow me to select between different test
suite files. But my ruby file looks like:
···
----------------
# ... my code to be tested
class A ... end
class B ... end
# test code
if __FILE__ == $0
require 'test/unit'
class Test_C < Test::Unit::TestCase
def test_1; ...; end
def test_2; ...; end
end
end
---------------
Am I doing something wrong? Can I get selection at the level of test methods
i.e. test_1 vs. test_2 ?