Sha256: 1addbcd10e5c2df100f69cad90606daa7a9f33aafd573a79af8e6db46b80954d
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 Bytes
Contents
# -*- coding: utf-8 -*- require 'minitest/autorun' require 'sixarm_ruby_date_time_rand' class TimeTest < Minitest::Test def test_rand rand = Time.rand assert_kind_of(Time, rand) end def test_rand_with_range now = Time.now range = (now - 1000)..(now + 1000) rand = Time.rand(range) assert_kind_of(Time, rand) assert(range.begin <= rand && rand <= range.end) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sixarm_ruby_date_time_rand-2.0.0 | test/sixarm_ruby_date_time_rand_test/time_test.rb |