Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
m: a better Ruby Test::Unit runner
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Nick Quaranto
April 11, 2012
Programming
610
2
Share
m: a better Ruby Test::Unit runner
Run tests by line number in Test::Unit, and more!
Presented at WNYRuby on April 11th, 2012.
Nick Quaranto
April 11, 2012
More Decks by Nick Quaranto
See All by Nick Quaranto
The GraphQL Way: A new path for JSON APIs
qrush
287
20k
Awesome Extractions Done Quick
qrush
1
570
rubygems.next
qrush
5
510
how to find GIFs
qrush
10
580
RubyMotion: The sleeper has awakened!
qrush
5
930
CoffeeScript - Spartan Javascript
qrush
0
610
Basecamp Next: Code Spelunking
qrush
62
9.1k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
590
Other Decks in Programming
See All in Programming
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
570
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
380
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
140
Vibe NLP for Applied NLP
inesmontani
PRO
0
450
実用!Hono RPC2026
yodaka
2
250
t *testing.T は どこからやってくるの?
otakakot
1
700
実践CRDT
tamadeveloper
0
590
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
1.1k
Don't Prompt Harder, Structure Better
kitasuke
0
780
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
220
ハーネスエンジニアリングとは?
kinopeee
12
5.9k
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Site-Speed That Sticks
csswizardry
13
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Test your architecture with Archunit
thirion
1
2.2k
Rails Girls Zürich Keynote
gr2m
96
14k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
510
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
200
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Skip the Path - Find Your Career Trail
mkilby
1
110
Transcript
m a better test-unit runner @qrush
i’m @qrush
@ i live here
c i work at 37signals
stands for metal m
None
runs tests by line number m
$ 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:
$ 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:
$ 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:
$ 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:
some facts m
works with test-unit, rails, mini-test 1. uses rocco for literate
documentation 2. four months of daily use 3.
how does it work m
programming is not magic
figure out where test methods are 1. match what line
you chose with tests we know about 2. run that test! 3.
__/\\\\____________/\\\\_ _\/\\\\\\________/\\\\\\_ _\/\\\//\\\____/\\\//\\\_ _\/\\\\///\\\/\\\/_\/\\\_ _\/\\\__\///\\\/___\/\\\_ _\/\\\____\///_____\/\\\_ _\/\\\_____________\/\\\_ _\/\\\_____________\/\\\_ _\///______________\///__ gem
install m http://quaran.to/m https://github.com/qrush/m