Sha256: d8f5fc526e7254fe2a7713366351a9d1446b707c93099b6c0910a1072993abca

Contents?: true

Size: 782 Bytes

Versions: 125

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(1970, 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(1970, 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

125 entries across 97 versions & 11 rubygems

Version Path
craigmarksmith-rake-0.8.3.100 test/test_earlytime.rb
craigmarksmith-rake-0.8.4.101 test/test_earlytime.rb
craigmarksmith-rake-0.8.4.102 test/test_earlytime.rb
craigmarksmith-rake-0.8.4.103 test/test_earlytime.rb
elliottcable-echoe-3.1.1 vendor/rake/test/test_earlytime.rb
elliottcable-echoe-3.1.2 vendor/rake/test/test_earlytime.rb
jimweirich-rake-0.8.1.11 test/test_earlytime.rb
jimweirich-rake-0.8.2.99 test/test_earlytime.rb
jimweirich-rake-0.8.2 test/test_earlytime.rb
jimweirich-rake-0.8.3.1 test/test_earlytime.rb
jimweirich-rake-0.8.3.100 test/test_earlytime.rb
jimweirich-rake-0.8.3.99 test/test_earlytime.rb
jimweirich-rake-0.8.3 test/test_earlytime.rb
jimweirich-rake-0.8.4.99 test/test_earlytime.rb
jimweirich-rake-0.8.5 test/test_earlytime.rb
luislavena-rake-0.8.3.99 test/test_earlytime.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/test_earlytime.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/test_earlytime.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/test_earlytime.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/rake-0.8.7/test/test_earlytime.rb