Test Doubles: When to Use Mock vs Stub vs Fake
Gerard Meszaros coined the term ’test double’ in his book xUnit Test Patterns to describe any object that stands in for a real dependency during testing. The film industry calls them stunt…
Read more →Gerard Meszaros coined the term ’test double’ in his book xUnit Test Patterns to describe any object that stands in for a real dependency during testing. The film industry calls them stunt…
Read more →Mocking in Rust is fundamentally different from dynamic languages. You can’t monkey-patch methods or swap implementations at runtime. Rust’s static typing and ownership rules make the patterns you’d…
Read more →Unit testing means testing code in isolation. But real code has dependencies—API clients, databases, file systems, third-party services. You don’t want your unit tests making actual HTTP requests or…
Read more →