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
2
530
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
288
20k
Awesome Extractions Done Quick
qrush
1
500
rubygems.next
qrush
5
430
how to find GIFs
qrush
10
530
RubyMotion: The sleeper has awakened!
qrush
5
830
CoffeeScript - Spartan Javascript
qrush
0
520
Basecamp Next: Code Spelunking
qrush
62
8.9k
Test Driven Development
qrush
14
1.4k
Lapidary: The Art of Gemcutting
qrush
2
480
Other Decks in Programming
See All in Programming
A New Era of Testing
mannodermaus
2
340
サーバーレスで負荷試験!Step Functions + Lambdaを使ったk6の分散実行
shuntakahashi
6
1.5k
マイグレーションコード自作して File-Based Routing に自動移行!! ~250 ページの歴史的経緯を添えて~
cut0
1
260
Go Code Generation at newmo / 2024-08-27 #newmo_layerx_go
genkey6
0
560
GenU導入でCDKに初挑戦し、悪戦苦闘した話
hideg
0
160
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
370
GoのIteratorに詳しくなってしまう
inatonix
1
200
Why Prism?
kddnewton
4
1.7k
エラーレスポンス設計から考える、0→1開発におけるGraphQLへの向き合い方
bicstone
5
1.5k
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
270
令和トラベルにおけるLLM活用事例:社内ツール開発から得た学びと実践
ippo012
0
130
Amazon Neptuneで始める初めてのグラフDB ー グラフDBを使う意味を考える ー
satoshi256kbyte
2
260
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
278
34k
How STYLIGHT went responsive
nonsquared
93
5.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
36
1.7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
Designing for humans not robots
tammielis
248
25k
Documentation Writing (for coders)
carmenintech
65
4.3k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Into the Great Unknown - MozCon
thekraken
29
1.4k
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
Speed Design
sergeychernyshev
22
430
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