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
520
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
500
rubygems.next
qrush
5
420
how to find GIFs
qrush
10
530
RubyMotion: The sleeper has awakened!
qrush
5
820
CoffeeScript - Spartan Javascript
qrush
0
510
Basecamp Next: Code Spelunking
qrush
62
8.9k
Test Driven Development
qrush
14
1.4k
Lapidary: The Art of Gemcutting
qrush
2
470
Other Decks in Programming
See All in Programming
Folding Cheat Sheet #7
philipschwarz
PRO
0
150
AWS CDKにおける「再利用性」を考える / aws-cdk-reusability
gotok365
6
1.3k
Introduction of Happy Eyeballs Version 2 (RFC8305) to the Socket library
coe401_
1
220
Google's Recipe for Scaling (Web) Security – LocoMocoSec 2024
lweichselbaum
0
170
わかりやすい正解を捨てて、コトに向き合う - スクラムフェス金沢2024 スポンサーセッション
yusukekokubo
0
170
Advanced App Shrinking Techniques
cbeyls
2
150
SRE チーム立ち上げ前に考えたこと・取り組んだこと / Considerations and Preparations Before Establishing an SRE Team
mackey0225
3
320
CSC307 Lecture 06
javiergs
PRO
0
360
CSC307 Lecture 11
javiergs
PRO
0
240
Introduction to GitOps
hwchiu
0
110
スクラムマスターって孤独じゃないですか?
yoshitaroyoyo
1
140
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
140
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
399
65k
Faster Mobile Websites
deanohume
303
30k
Docker and Python
trallard
37
2.9k
How GitHub Uses GitHub to Build GitHub
holman
471
290k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
It's Worth the Effort
3n
181
27k
Fantastic passwords and where to find them - at NoRuKo
philnash
42
2.7k
Speed Design
sergeychernyshev
9
270
GraphQLとの向き合い方2022年版
quramy
36
13k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
44
4.7k
Testing 201, or: Great Expectations
jmmastey
33
6.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
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