diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 17:46:24 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 17:46:24 +0200 |
| commit | ae503e9498553d50cc145d26f4b3457276fc14ba (patch) | |
| tree | ee8793df7baa4503dcfa13ee342a4e875e65d0d9 /tests/host_adapter_contract.lua | |
| parent | 3ef0616d516d8c8059380566a29852474d95e801 (diff) | |
Share test assertion helpers
Diffstat (limited to 'tests/host_adapter_contract.lua')
| -rw-r--r-- | tests/host_adapter_contract.lua | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/host_adapter_contract.lua b/tests/host_adapter_contract.lua index ff369d5..5d22a85 100644 --- a/tests/host_adapter_contract.lua +++ b/tests/host_adapter_contract.lua @@ -11,19 +11,9 @@ local composition_root = require("clever_f.composition_root") local domain = require("clever_f.domain") local host_adapter = require("clever_f.host_adapter") -local function same(expected, actual, message) - if expected ~= actual then - error((message or "values differ") - .. ": expected " .. tostring(expected) - .. ", got " .. tostring(actual), 2) - end -end - -local function truthy(value, message) - if not value then - error(message or "value must be true", 2) - end -end +local assertions = dofile(root .. "/tests/assertions.lua") +local same = assertions.same +local truthy = assertions.truthy local exercised = {} local host = host_adapter.new() |
