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
560
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
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
150
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
940
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
8
4.4k
Rethinking API Platform Filters
vinceamstoutz
0
7.1k
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
240
飯MCP
yusukebe
0
480
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
490
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
220
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
820
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
820
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.3k
The Curious Case for Waylosing
cassininazir
0
290
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
How to build a perfect <img>
jonoalderson
1
5.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
A Tale of Four Properties
chriscoyier
163
24k
How to Ace a Technical Interview
jacobian
281
24k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
200
Testing 201, or: Great Expectations
jmmastey
46
8.1k
The browser strikes back
jonoalderson
0
880
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