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
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
620
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
JavaDoc 再入門
nagise
0
260
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
610
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
440
Moments When Things Go Wrong
aurimas
3
140
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
160
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
560
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
430
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
180
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.5k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
130
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
Side Projects
sachag
455
43k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
260
First, design no harm
axbom
PRO
2
1.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
520
Automating Front-end Workflow
addyosmani
1370
210k
Building Applications with DynamoDB
mza
96
7.1k
Accessibility Awareness
sabderemane
1
130
Prompt Engineering for Job Search
mfonobong
0
330
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
A designer walks into a library…
pauljervisheath
211
24k
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