Sha256: a2ee1360a40c8446bdcfc3565959c66bf48e53b2807fc336857cd369b6a664de

Contents?: true

Size: 782 Bytes

Versions: 10

Compression:

Stored size: 782 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

  def test_to_s
    assert_equal "<EARLY TIME>", Rake::EARLY.to_s
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
jimweirich-rake-0.8.1.10 test/test_earlytime.rb
jimweirich-rake-0.8.1.5 test/test_earlytime.rb
jimweirich-rake-0.8.1.6 test/test_earlytime.rb
jimweirich-rake-0.8.1.7 test/test_earlytime.rb
jimweirich-rake-0.8.1.8 test/test_earlytime.rb
jimweirich-rake-0.8.1.9 test/test_earlytime.rb
rake-0.8.1 test/test_earlytime.rb
rake-0.8.0 test/test_earlytime.rb
rake-0.7.3 test/test_earlytime.rb
rake-0.7.2 test/test_earlytime.rb