Detroit
MiniTest¶ ↑
Overview¶ ↑
Detroit
MiniTest is a plug-in for the Detroit
build tool.
The plugin itself is being tested using a top-down approach with the QED test framework. Each section represents a scenario deemed significant to test.
Break On Failure¶ ↑
The Detroit
test service should terminate when tests fail.
Given a test file called “test_example.rb” containing:
class TestFailure < MiniTest::Unit::TestCase def test_failure assert(1 == 2) end end
We can demonstrate this feature of the Detroit
MiniTest plug-in via code.
tester = Detroit::MiniTest.new(:tests=>['test_example.rb'])
Since the test has an assertion failure, running the tests should cause execution to abort.
expect SystemExit do silently { tester.test } end