Module: RSMP::Validator::Helpers::Clock

Defined in:
lib/rsmp/validator/helpers/clock.rb

Overview

Helper methods for testing RSMP clock functionality.

Instance Method Summary collapse

Instance Method Details

#with_clock_set(site_proxy, clock, within:) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/rsmp/validator/helpers/clock.rb', line 6

def with_clock_set(site_proxy, clock, within:)
  site_proxy.tlc.set_clock(clock, within:)
  site_proxy.clear_alarm_timestamps
  yield
ensure
  site_proxy.tlc.set_clock(Time.now.utc, within:)
end