---
date: "2025-01-21T22:13:00-05:00"
tags:
  - programming
  - readwise
  - ruby
---

# [A Real-World Example of a Mocktail Test](https://justin.searls.co/posts/a-real-world-mocktail-example-test/)

> Names that put the verb before the noun. By giving the verb primacy, as the system grows and opportunities for reuse arise, this encourages me to generalize the _direct object_ of the class via polymorphism as opposed to generalizing the _core function_ of the class, violating the [single-responsibility principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) (i.e. `PetsDog` may evolve into `PetsAnimal`, whereas `DogPetter` is more likely to evolve into a catch-all `DogManager`)

I've definitely written classes that (d)evolved from `DogPetter` to `DogManager`. I'm going to give this verb-first naming a spin.
