module RandTest::Time

Public Instance Methods

random_time() click to toggle source
# File lib/rand-rspec/time.rb, line 6
def random_time
  epoch = random_number(::Time.now.to_i)
  ::Time.at(epoch)
end