# HG changeset patch # User Kim Alvefur # Date 1702826943 -3600 # Node ID c8f3cfe59e90530c460aa304182aeb7794eb1710 # Parent 034c7af177f0fd0229ae31d3fde4664764299217 scansion: Use captures or wildcards instead of mocking time > Mockery is one of the things I hold dear! And he's making a mockery of it!! -- Belkar Bitterleaf diff -r 034c7af177f0 -r c8f3cfe59e90 spec/scansion/extdisco.scs --- a/spec/scansion/extdisco.scs Sat Dec 16 13:47:55 2023 +0100 +++ b/spec/scansion/extdisco.scs Sun Dec 17 16:29:03 2023 +0100 @@ -17,8 +17,8 @@ - - + + @@ -47,8 +47,8 @@ Romeo receives: - - + + diff -r 034c7af177f0 -r c8f3cfe59e90 spec/scansion/lastactivity.scs --- a/spec/scansion/lastactivity.scs Sat Dec 16 13:47:55 2023 +0100 +++ b/spec/scansion/lastactivity.scs Sun Dec 17 16:29:03 2023 +0100 @@ -37,7 +37,7 @@ Romeo receives: - Goodbye + Goodbye Romeo disconnects diff -r 034c7af177f0 -r c8f3cfe59e90 spec/scansion/mam_extended.scs --- a/spec/scansion/mam_extended.scs Sat Dec 16 13:47:55 2023 +0100 +++ b/spec/scansion/mam_extended.scs Sun Dec 17 16:29:03 2023 +0100 @@ -45,8 +45,8 @@ Romeo receives: - - + + @@ -57,9 +57,9 @@ Romeo receives: - + - + Hello @@ -69,9 +69,9 @@ Romeo receives: - + - + U there? @@ -98,7 +98,7 @@ - + U there? @@ -110,7 +110,7 @@ - + Hello diff -r 034c7af177f0 -r c8f3cfe59e90 spec/scansion/prosody.cfg.lua --- a/spec/scansion/prosody.cfg.lua Sat Dec 16 13:47:55 2023 +0100 +++ b/spec/scansion/prosody.cfg.lua Sun Dec 17 16:29:03 2023 +0100 @@ -1,15 +1,5 @@ --luacheck: ignore --- Mock time functions to simplify tests -- -local time = require "util.time"; -function _G.os.time() - return 1219439344; -end -function time.now() - return 1219439344.5; -end -------------------------------------------- - admins = { "admin@localhost" } network_backend = ENV_PROSODY_NETWORK_BACKEND or "epoll" diff -r 034c7af177f0 -r c8f3cfe59e90 spec/scansion/uptime.scs --- a/spec/scansion/uptime.scs Sat Dec 16 13:47:55 2023 +0100 +++ b/spec/scansion/uptime.scs Sun Dec 17 16:29:03 2023 +0100 @@ -15,7 +15,7 @@ Romeo receives: - + Romeo disconnects