Sha256: 7b5fc7b2d4c04365f01fc7fb96d534b6ab3268b909633a001b07c9a2c81ab492
Contents?: true
Size: 395 Bytes
Versions: 1
Compression:
Stored size: 395 Bytes
Contents
# -*- coding: utf-8 -*- require "sixarm_ruby_date_time_random_test" class DateTimeTest < Minitest::Test def test_random x = DateTime.random assert_kind_of(DateTime, x) end def test_random_with_range now = DateTime.now range = (now - 10)..(now + 10) x = DateTime.random(range) assert_kind_of(DateTime, x) assert(range.begin <= x && x <= range.end) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sixarm_ruby_date_time_random-3.0.0 | test/sixarm_ruby_date_time_random_test/date_time_test.rb |