Sha256: 6cbf1495c636be105526aca35c04b996829349bab28f2e5a9959ae36846006f9

Contents?: true

Size: 709 Bytes

Versions: 4

Compression:

Stored size: 709 Bytes

Contents

#!/usr/bin/env ruby

require 'test/unit'
require 'rake'

class TestEarlyTime < Test::Unit::TestCase
  def test_create
    early = Rake::EarlyTime.instance
    time = Time.mktime(1920, 1, 1, 0, 0, 0)
    assert early <= Time.now
    assert early < Time.now
    assert early != Time.now
    assert Time.now > early
    assert Time.now >= early
    assert Time.now != early
  end

  def test_equality
    early = Rake::EarlyTime.instance
    assert_equal early, early, "two early times should be equal"
  end

  def test_original_time_compare_is_not_messed_up
    t1 = Time.mktime(1920, 1, 1, 0, 0, 0)
    t2 = Time.now
    assert t1 < t2
    assert t2 > t1
    assert t1 == t1
    assert t2 == t2    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rake-0.6.2 test/test_earlytime.rb
rake-0.6.0 test/test_earlytime.rb
rake-0.7.0 test/test_earlytime.rb
rake-0.7.1 test/test_earlytime.rb