From fe560961cc43c9e3d71e48937c591062b1cb8813 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Tue, 16 May 2023 13:20:16 -0400 Subject: [PATCH] Testing third-party/network --- content/notes/good-tests/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/content/notes/good-tests/index.md b/content/notes/good-tests/index.md index 5cbe8be..60ddd86 100644 --- a/content/notes/good-tests/index.md +++ b/content/notes/good-tests/index.md @@ -21,8 +21,12 @@ _(Notes for a Viget article I'm putting together)_ * Visit a page * Interact with it * Make assertions about the results -* Create stub objects to stand in for network calls +* Third-party/network calls + * VCR is … OK but can become a maintenance problem + * Block access to the web + * Create stub objects to stand in for network calls * Use [JSON Schema][1] to ensure stub stays in sync + * This will lead to more reliable tests and also more robust code * Coverage * We shoot for 100% in SimpleCov (So all the Ruby is tested) * Some consider this too high or too burdensome -- I don't