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
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
570
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
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
360
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
320
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
210
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.9k
10 Tips of AWS ~Gen AI on AWS~
licux
5
380
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
210
Nuxt Server Components
wattanx
0
280
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
790
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.5k
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
140
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
Vibe NLP for Applied NLP
inesmontani
PRO
0
420
Featured
See All Featured
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
160
First, design no harm
axbom
PRO
2
1.2k
Mind Mapping
helmedeiros
PRO
1
150
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The untapped power of vector embeddings
frankvandijk
2
1.7k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Embracing the Ebb and Flow
colly
88
5k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
510
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
520
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