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
Nick Quaranto
April 11, 2012
Programming
2
590
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
Tweet
Share
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
550
rubygems.next
qrush
5
500
how to find GIFs
qrush
10
560
RubyMotion: The sleeper has awakened!
qrush
5
910
CoffeeScript - Spartan Javascript
qrush
0
590
Basecamp Next: Code Spelunking
qrush
62
9.1k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
560
Other Decks in Programming
See All in Programming
Go Conference 2025: Goで体感するMultipath TCP ― Go 1.24 時代の MPTCP Listener を理解する
takehaya
9
1.7k
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
260
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
410
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
120
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
5
1.8k
Flutterで分数(Fraction)を表示する方法
koukimiura
0
130
Go言語はstack overflowの夢を見るか?
logica0419
0
380
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
15
5.6k
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
980
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
160
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
500
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
540
Featured
See All Featured
Become a Pro
speakerdeck
PRO
29
5.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
What's in a price? How to price your products and services
michaelherold
246
12k
Music & Morning Musume
bryan
46
6.8k
The World Runs on Bad Software
bkeepers
PRO
72
11k
For a Future-Friendly Web
brad_frost
180
10k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
7.8k
Faster Mobile Websites
deanohume
310
31k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
A Tale of Four Properties
chriscoyier
161
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
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