Slide 1

Slide 1 text

m a better test-unit runner @qrush

Slide 2

Slide 2 text

i’m @qrush

Slide 3

Slide 3 text

@ i live here

Slide 4

Slide 4 text

c i work at 37signals

Slide 5

Slide 5 text

stands for metal m

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

runs tests by line number m

Slide 8

Slide 8 text

$ 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.

Slide 17

Slide 17 text

__/\\\\____________/\\\\_ _\/\\\\\\________/\\\\\\_ _\/\\\//\\\____/\\\//\\\_ _\/\\\\///\\\/\\\/_\/\\\_ _\/\\\__\///\\\/___\/\\\_ _\/\\\____\///_____\/\\\_ _\/\\\_____________\/\\\_ _\/\\\_____________\/\\\_ _\///______________\///__ gem install m http://quaran.to/m https://github.com/qrush/m