| This code, originally provided as a patch, is now bundled with Watir 1.5.
Technically, it is not a patch for Watir, but rather for Test::Unit. |
Run your test methods in the order you've defined them
Ruby's test-unit library executes test methods in alphabetical order. This test case subclass executes them in the order you define them instead.
Download Patch
To change the way the methods in a test case are executed use execute :sequentially:
require 'watir/testcase' class TC2_Sequential < Watir::TestCase def test_b; print 'E'; end def test_a; print 'F'; end def test_d; print 'G'; end def test_c; print 'H'; end end