Skip to content

Instantly share code, notes, and snippets.

View Alpheus's full-sized avatar

Denis Čahuk Alpheus

View GitHub Profile
@Alpheus
Alpheus / rules for good testing.md
Created March 5, 2025 21:19 — forked from Integralist/rules for good testing.md
Sandi Metz advice for writing tests

Rules for good testing

Look at the following image...

...it shows an object being tested.

You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.