Sha256: d04ebbc3c9af6eae071b437ed4eebd1b48bae6f3cb9ac016186972f4330b0604
Contents?: true
Size: 499 Bytes
Versions: 1
Compression:
Stored size: 499 Bytes
Contents
# -*- coding: utf-8 -*- require "minitest/autorun" require "coveralls"; Coveralls.wear! require "simplecov"; SimpleCov.start require "sixarm_ruby_date_time_rand" class DateTimeTest < Minitest::Test def test_rand rand = DateTime.rand assert_kind_of(DateTime, rand) end def test_rand_with_range now = DateTime.now range = (now - 10)..(now + 10) rand = DateTime.rand(range) assert_kind_of(DateTime, 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.2 | test/sixarm_ruby_date_time_rand_test/date_time_test.rb |