$30 off During Our Annual Pro Sale. View Details »
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
590
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
500
how to find GIFs
qrush
10
560
RubyMotion: The sleeper has awakened!
qrush
5
920
CoffeeScript - Spartan Javascript
qrush
0
590
Basecamp Next: Code Spelunking
qrush
62
9.1k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
570
Other Decks in Programming
See All in Programming
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
150
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
130
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
300
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.9k
AIコーディングエージェント(Gemini)
kondai24
0
240
Developing static sites with Ruby
okuramasafumi
0
310
認証・認可の基本を学ぼう前編
kouyuume
0
250
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3k
dotfiles 式年遷宮 令和最新版
masawada
1
790
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
510
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
370
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Practical Orchestrator
shlominoach
190
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Bash Introduction
62gerente
615
210k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.3k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How Software Deployment tools have changed in the past 20 years
geshan
0
29k
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