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
530
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
510
rubygems.next
qrush
5
450
how to find GIFs
qrush
10
530
RubyMotion: The sleeper has awakened!
qrush
5
840
CoffeeScript - Spartan Javascript
qrush
0
530
Basecamp Next: Code Spelunking
qrush
62
9k
Test Driven Development
qrush
14
1.4k
Lapidary: The Art of Gemcutting
qrush
2
500
Other Decks in Programming
See All in Programming
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
440
EventSourcingの理想と現実
wenas
6
2.3k
現場で役立つモデリング 超入門
masuda220
PRO
15
3.1k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
160
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
340
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
1
310
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
200
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
780
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
180
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
520
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
220
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Speed Design
sergeychernyshev
24
610
Code Review Best Practice
trishagee
64
17k
A better future with KSS
kneath
238
17k
Docker and Python
trallard
40
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
830
A Philosophy of Restraint
colly
203
16k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
GraphQLとの向き合い方2022年版
quramy
43
13k
What's new in Ruby 2.0
geeforr
343
31k
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