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
620
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
520
how to find GIFs
qrush
10
580
RubyMotion: The sleeper has awakened!
qrush
5
940
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
600
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
670
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
220
Agentic UI beyond Chats Architecture Patterns & Open Standards @ngMunich 05/2026
manfredsteyer
PRO
0
170
今さら聞けないCancellationToken
htkym
0
200
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
260
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
120
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
390
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
210
AIエージェントの隔離技術の徹底比較
kawayu
0
440
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
170
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
160
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Designing Experiences People Love
moore
143
24k
Typedesign – Prime Four
hannesfritz
42
3.1k
Navigating Weather and Climate Data
rabernat
0
200
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Ethics towards AI in product and experience design
skipperchong
2
290
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
470
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