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
490
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
490
rubygems.next
qrush
5
400
how to find GIFs
qrush
10
530
RubyMotion: The sleeper has awakened!
qrush
5
800
CoffeeScript - Spartan Javascript
qrush
0
490
Basecamp Next: Code Spelunking
qrush
62
8.9k
Test Driven Development
qrush
14
1.4k
Lapidary: The Art of Gemcutting
qrush
2
450
Other Decks in Programming
See All in Programming
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
160
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
850
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
160
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
9
4.2k
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
890
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
640
Elm 0.19.0 Changes
bkuhlmann
0
490
ゆるい個人開発のススメ
kuroppe1819
10
1k
Implementing Design Systems in Swift
seyfoyun
0
370
Next.js App Router
quramy
11
1.5k
Netty Chicago Java User Group 2024-04-17
sullis
0
200
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
1k
Featured
See All Featured
Building Effective Engineering Teams - LeadDev
addyosmani
31
1.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
1.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
Music & Morning Musume
bryan
41
5.6k
Building an army of robots
kneath
300
41k
Become a Pro
speakerdeck
PRO
12
4.6k
Six Lessons from altMBA
skipperchong
22
3k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Creatively Recalculating Your Daily Design Routine
revolveconf
211
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
What's new in Ruby 2.0
geeforr
337
31k
Why Our Code Smells
bkeepers
PRO
331
56k
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