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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Nick Quaranto
April 11, 2012
Programming
2
600
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
560
rubygems.next
qrush
5
500
how to find GIFs
qrush
10
570
RubyMotion: The sleeper has awakened!
qrush
5
920
CoffeeScript - Spartan Javascript
qrush
0
600
Basecamp Next: Code Spelunking
qrush
62
9.1k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
580
Other Decks in Programming
See All in Programming
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Grafana:建立系統全知視角的捷徑
blueswen
0
320
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
AgentCoreとHuman in the Loop
har1101
5
220
AIエージェントの設計で注意するべきポイント6選
har1101
7
3.4k
Fragmented Architectures
denyspoltorak
0
150
Data-Centric Kaggle
isax1015
2
760
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
CSC307 Lecture 01
javiergs
PRO
0
690
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
190
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
4.9k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
670
Ethics towards AI in product and experience design
skipperchong
2
190
Test your architecture with Archunit
thirion
1
2.1k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
From π to Pie charts
rasagy
0
120
Docker and Python
trallard
47
3.7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
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