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
540
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
520
rubygems.next
qrush
5
450
how to find GIFs
qrush
10
530
RubyMotion: The sleeper has awakened!
qrush
5
850
CoffeeScript - Spartan Javascript
qrush
0
540
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
Symfony Mapper Component
soyuka
2
730
事業成長を爆速で進めてきたプロダクトエンジニアたちの成功談・失敗談
nealle
3
1.4k
N.E.X.T LEVEL
pluu
2
300
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
160
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
From Translations to Multi Dimension Entities
alexanderschranz
2
130
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
Security_for_introducing_eBPF
kentatada
0
110
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
600
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
良いユニットテストを書こう
mototakatsu
4
1.5k
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
33
1.5k
Unsuck your backbone
ammeep
669
57k
Making Projects Easy
brettharned
116
5.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
KATA
mclloyd
29
14k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Become a Pro
speakerdeck
PRO
26
5k
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