Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
m: a better Ruby Test::Unit runner
Search
Nick Quaranto
April 11, 2012
Programming
630
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
590
rubygems.next
qrush
5
550
how to find GIFs
qrush
10
600
RubyMotion: The sleeper has awakened!
qrush
5
960
CoffeeScript - Spartan Javascript
qrush
0
650
Basecamp Next: Code Spelunking
qrush
62
9.2k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
630
Other Decks in Programming
See All in Programming
Performance Optimization With LLMs
xleitix
0
160
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
0
130
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.6k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Domain-Driven Transformation
hschwentner
2
2.3k
Railsバージョンを4倍にした話
optim
0
460
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Next.js: The final boss of Web Performance
guaca
0
290
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
430
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
880
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
The Curse of the Amulet
leimatthew05
3
16k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
エンジニアに許された特別な時間の終わり
watany
109
250k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
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