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
610
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
510
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
Ruby x Terminal
a_matsuda
6
570
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
200
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
180
CSC307 Lecture 11
javiergs
PRO
0
590
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.5k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
360
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
370
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
240
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
390
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
120
CSC307 Lecture 10
javiergs
PRO
1
690
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
2.7k
Building Applications with DynamoDB
mza
96
6.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
280
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
480
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
We Are The Robots
honzajavorek
0
190
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
It's Worth the Effort
3n
188
29k
The World Runs on Bad Software
bkeepers
PRO
72
12k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
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