$ cat -n test/example_test.rb
1 require 'test/unit'
2
3 class ExampleTest < Test::Unit::TestCase
4 def test_apple
5 assert_equal 1, 1
6 end
7
8 def test_banana
9 assert_equal 1, 1
10 end
11 end
you wrote:
Slide 9
Slide 9 text
$ m test/example_test.rb:4
Run options: -n /test_apple/
# Running tests:
.
Finished tests in 0.000525s,
1904.7619 tests/s, 1904.7619 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors,
0 skips
run one test:
Slide 10
Slide 10 text
$ m test/example_test.rb:2
No tests found on line 2. Valid tests to run:
test_apple: m test/examples/test_unit_example_test.rb:4
test_banana: m test/examples/test_unit_example_test.rb:8
wrong line:
Slide 11
Slide 11 text
$ m test/example_test.rb
Run options:
# Running tests:
..
Finished tests in 0.001293s, 1546.7904 tests/s,
3093.5808 assertions/s.
1 tests, 2 assertions, 0 failures, 0 errors, 0 skips
run it all:
Slide 12
Slide 12 text
some
facts
m
Slide 13
Slide 13 text
works with test-unit,
rails, mini-test
1.
uses rocco for literate
documentation
2.
four months of daily use
3.
Slide 14
Slide 14 text
how does it
work
m
Slide 15
Slide 15 text
programming is not magic
Slide 16
Slide 16 text
figure out where test
methods are
1.
match what line you chose
with tests we know about
2.
run that test!
3.