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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Nick Quaranto
April 11, 2012
Programming
610
2
Share
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
570
rubygems.next
qrush
5
520
how to find GIFs
qrush
10
580
RubyMotion: The sleeper has awakened!
qrush
5
930
CoffeeScript - Spartan Javascript
qrush
0
610
Basecamp Next: Code Spelunking
qrush
62
9.1k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
600
Other Decks in Programming
See All in Programming
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
250
tRPCの概要と少しだけパフォーマンス
misoton665
2
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
160
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
210
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
310
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
130
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
720
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
6
1.8k
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
180
Are We Really Coding 10× Faster with AI?
kohzas
0
120
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
Featured
See All Featured
We Are The Robots
honzajavorek
0
220
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Mind Mapping
helmedeiros
PRO
1
190
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
120
Designing for humans not robots
tammielis
254
26k
Chasing Engaging Ingredients in Design
codingconduct
0
180
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
Building Applications with DynamoDB
mza
96
7k
Become a Pro
speakerdeck
PRO
31
5.9k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
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