Skip to main content

Module test_time

Module test_time 

Source
Expand description

Test time control (Rails travel_to / travel).

Rust has no global mutable clock, so tests thread a TestClock through the code under test (read time via clock.now()), then move it with travel/ travel_to.

Structs§

TestClock
A clock whose “now” can be set and advanced.