Browsing the /r/golang subreddit, you might get the impression that "mock" is a dirty word.

I was recently reading a thread on testing strategies and was surprised by the intensity of the anti-mock sentiment. The arguments were visceral:

Avoid mocks like the plague.

Mocks are like payday loans. Convenient. You say “expect this method to be called with args X and Y, return Z”. Seems cheap. But the loan shark quickly starts charging interest.

At FunnelStory, we see it differently. We’ve learned to love mocks—not as a shortcut, but as the only way to meaningfully build and maintain a complex application as a small team (with no dedicated QA).

We manage a complex dist…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help