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
570
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
540
rubygems.next
qrush
5
480
how to find GIFs
qrush
10
550
RubyMotion: The sleeper has awakened!
qrush
5
880
CoffeeScript - Spartan Javascript
qrush
0
570
Basecamp Next: Code Spelunking
qrush
62
9k
Test Driven Development
qrush
14
1.5k
Lapidary: The Art of Gemcutting
qrush
2
530
Other Decks in Programming
See All in Programming
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
400
Ruby's Line Breaks
yui_knk
2
1.2k
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3k
AIコードエディタの基盤となるLLMのFlutter性能評価
alquist4121
0
210
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
670
RuboCop: Modularity and AST Insights
koic
2
1.2k
Amazon CloudWatchの地味だけど強力な機能紹介!
itotsum
0
170
AI時代の開発者評価について
ayumuu
0
150
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
4
1k
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
2.4k
Optimizing JRuby 10
headius
0
340
Featured
See All Featured
Designing for Performance
lara
608
69k
Typedesign – Prime Four
hannesfritz
41
2.6k
Statistics for Hackers
jakevdp
798
220k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Documentation Writing (for coders)
carmenintech
69
4.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.4k
Become a Pro
speakerdeck
PRO
27
5.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
A better future with KSS
kneath
239
17k
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