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
490
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
490
rubygems.next
qrush
5
400
how to find GIFs
qrush
10
520
RubyMotion: The sleeper has awakened!
qrush
5
790
CoffeeScript - Spartan Javascript
qrush
0
480
Basecamp Next: Code Spelunking
qrush
62
8.9k
Test Driven Development
qrush
14
1.4k
Lapidary: The Art of Gemcutting
qrush
2
450
Other Decks in Programming
See All in Programming
"config" ってなんだ? / What is "config"?
okashoi
0
220
Tailwind CSSを本気でカスタマイズする方法
fsubal
2
160
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
100
Ruby GitHub Packages
bkuhlmann
0
620
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
330
OpenTelemetry のサービスという概念について
azukiazusa1
2
1.1k
Changed Rules: Architectures with Lightweight Stores
manfredsteyer
PRO
0
230
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
350
Designing for tomorrow's programming workflows
honnibal
PRO
2
110
Code Reviews
bkuhlmann
4
880
今、知っておきたい! 生成AIエージェントの世界
elith
3
340
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
220
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
The Invisible Side of Design
smashingmag
294
49k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
The Power of CSS Pseudo Elements
geoffreycrofte
59
5k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
5
1.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
19
1.9k
How GitHub (no longer) Works
holman
304
140k
Scaling GitHub
holman
457
140k
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