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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
580
rubygems.next
qrush
5
530
how to find GIFs
qrush
10
590
RubyMotion: The sleeper has awakened!
qrush
5
950
CoffeeScript - Spartan Javascript
qrush
0
630
Basecamp Next: Code Spelunking
qrush
62
9.2k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
620
Other Decks in Programming
See All in Programming
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
200
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
570
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
190
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
600
Flow は今どうなっているか
mizdra
PRO
0
690
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
370
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.1k
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1k
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
290
React本体のコードリーディング
high_g_engineer
1
150
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Building Applications with DynamoDB
mza
96
7.2k
Designing for humans not robots
tammielis
254
26k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
470
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
290
A designer walks into a library…
pauljervisheath
211
24k
A Tale of Four Properties
chriscoyier
163
24k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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