summaryrefslogtreecommitdiff
path: root/Don't mock what you don't own.md
diff options
context:
space:
mode:
Diffstat (limited to 'Don't mock what you don't own.md')
-rw-r--r--Don't mock what you don't own.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/Don't mock what you don't own.md b/Don't mock what you don't own.md
new file mode 100644
index 0000000..d1db60f
--- /dev/null
+++ b/Don't mock what you don't own.md
@@ -0,0 +1,15 @@
+---
+tags:
+ - dev
+ - testing
+---
+[[Mocks aren't stubs]]
+[[Verified fake]]
+
+Oftentimes wrapping a third-party object in a lightweight facade will improve the code but also increases test-ability dramatically.
+
+If the third-party library already exposes an idiomatic interface, it is probably not worth wrapping it into a similar one just so it belongs to you. (Cough openstacksdk).
+
+
+---
+https://hynek.me/articles/what-to-mock-in-5-mins/ \ No newline at end of file