rack-attack/spec/support/freeze_time_helper.rb
Santiago Bartesaghi cb82b9f873
ci: freeze time in more specs (#643)
* ci: freeze time in more specs

* Introduce within_same_period helper method

---------

Co-authored-by: Gonzalo <456459+grzuy@users.noreply.github.com>
2024-01-10 11:55:37 -03:00

9 lines
141 B
Ruby

# frozen_string_literal: true
require "timecop"
class Minitest::Spec
def within_same_period(&block)
Timecop.freeze(&block)
end
end