HackerTube.dev

Rails Conf 2013 The Magic Tricks of Testing by Sandi Metz

Confreaks · 144.5K views · 2013-05-22 · 32:23

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

Sandi Metz's RailsConf 2013 talk offers practical guidelines for deciding what to test and how, so tests stay cheap and stable. She argues for testing the public interface rather than implementation and using mocks appropriately.

On Hacker News

HN recommends it as an incredible talk whose testing principles apply beyond Ruby.

Recommended by 5 HN people across 5 months · HN mentions 2013–2019

Topics

Search by tags

What people said

AlwaysBCoding · 2013-09 · Strong recommendation

What I wish people had told me about testing: * You write tests in accordance with a pattern: 1. Arrange 2. Act 3. Assert 4. Annihilate If you annihilate your test data with configuration options, and you abstract your "arranging" into factories and custom methods, then every test you write should be exactly three lines. When I learned this it gave me a consistent mental framework to think about how to write good tests. * Test the interface not the implementation: This was an eye opening realization about what to test. If you haven't seen it yet, watch Sandi Metz' incredible RailsConf talk - [VIDEO] - it's so good * Stubs: Stubs are exactly like the viruses' that we learned about in biology class. You load them up with a value then they literally latch onto a method and inject that value into it. When you're just starting out with testing, effective use of stubs can get you really far, and only when you start hitting the limits of practicality is when you need to think about bringing in something more complicated. * Testing isn't easy per se, but it is definitely enjoyable if you focus on making it that way * Cucumber is pretty stupid, don't waste your time with it

Read the original HN comment ↗
jakespracher · 2019-11 · Recommendation

Not always before, but always eventually and usually once I’m done with “exploration”. Testing done right should be a time saver in the long run! I think many people are turned off by testing and especially unit testing because it ends up being difficult and maintenance is more of a pain than it’s worth. There are many good strategies to make it easier that in my experience have yet to be well adopted: [VIDEO] [LINK]

Read the original HN comment ↗
teeray · 2018-11 · Recommendation

There are some really fantastic testing resources in the Ruby community. The talk that most influenced my approach to building unit tests (even though I write Go these days) was one of Jim Weirich’s: [LINK] I’ve found that his zero-knowledge approach gives me a suite of tests that have high signal when they fail. Sandi Metz has also spoken extensively on testing, and I particularly like her advice on using mocks in tests appropriately. This talk of hers on the subject comes to mind: [VIDEO]

Read the original HN comment ↗

Sources

Video by Confreaks, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources