Sha256: bb48212c011fa2936f5c3e7c1869aace03e841faab1fedd076cb773fc00aae3f

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

# -*- coding: utf-8 -*-
require "minitest/autorun"
require "coveralls"; Coveralls.wear!
require "simplecov"; SimpleCov.start
require "sixarm_ruby_date_time_rand"

class DateTest < Minitest::Test

  def test_rand
    rand = Date.rand
    assert_kind_of(Date, rand)
  end
 
  def test_rand_with_range
    today = Date.today
    range = (today - 1000)..(today + 1000)
    rand = Date.rand(range)
    assert_kind_of(Date, 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_test.rb