| layout | pattern | |
|---|---|---|
| title | Object Mother | |
| folder | object-mother | |
| permalink | /patterns/object-mother/ | |
| categories | Creational | |
| tags |
|
Define a factory of immutable content with separated builder and factory interfaces.
Use the Object Mother pattern when
- You want consistent objects over several tests
- You want to reduce code for creation of objects in tests
- Every test should run with fresh data
