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
560
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
530
rubygems.next
qrush
5
470
how to find GIFs
qrush
10
540
RubyMotion: The sleeper has awakened!
qrush
5
870
CoffeeScript - Spartan Javascript
qrush
0
550
Basecamp Next: Code Spelunking
qrush
62
9k
Test Driven Development
qrush
14
1.4k
Lapidary: The Art of Gemcutting
qrush
2
520
Other Decks in Programming
See All in Programming
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
14
4.6k
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
190
GoとPHPのインターフェイスの違い
shimabox
2
210
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
110
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.1k
CI改善もDatadogとともに
taumu
0
190
2025.2.14_Developers Summit 2025_登壇資料
0101unite
0
180
ML.NETで始める機械学習
ymd65536
0
230
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
240
Domain-Driven Transformation
hschwentner
2
1.9k
Jakarta EE meets AI
ivargrimstad
0
320
仕様変更に耐えるための"今の"DRY原則を考える
mkmk884
9
3.1k
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building an army of robots
kneath
303
45k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
GraphQLとの向き合い方2022年版
quramy
44
14k
Git: the NoSQL Database
bkeepers
PRO
427
65k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
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