For example, when these tests are run, I want to ensure that test_fizz
always runs first.
require 'test/unit'
class FooTest < Test::Unit::TestCase
def test_fizz
puts "Running fizz"
assert true
end
def test_bar
puts "Running bar"
assert true
end
end
Update: Why do I want to do this? My thought is that early failure by certain tests (those testing the simpler, more fundamental methods) will make it easier to track down problems in the system. For example, the success of bar
hinges on fizz
working correctly. If fizz
is broken, I want to know that right off the bat, because there's no need to worry about bar
, which will fail too, but with much more complicated output in the test results.