Sha256: 7c11bbda22f7f20ce62f66fcc834adbcd9321ec01753f50eac02ce2e31c38c5e

Contents?: true

Size: 748 Bytes

Versions: 160

Compression:

Stored size: 748 Bytes

Contents

require 'test_helper'
require 'tins'

module Tins
  class TimeDummyTest < Test::Unit::TestCase
    require 'tins/xt/time_dummy'
    require 'time'

    def test_time_dummy
      time = Time.parse('2009-09-09 21:09:09')
      assert_not_equal time, Time.now
      Time.dummy = time
      assert_equal time, Time.now
      Time.dummy = nil
      assert_not_equal time, Time.now
    end

    def test_time_dummy_block
      time = Time.parse('2009-09-09 21:09:09')
      assert_not_equal time, Time.now
      Time.dummy time do
        assert_equal time, Time.now
        Time.dummy time + 1 do
          assert_equal time + 1, Time.now
        end
        assert_equal time, Time.now
      end
      assert_not_equal time, Time.now
    end
  end
end

Version data entries

160 entries across 142 versions & 9 rubygems

Version Path
tdiary-5.0.4 vendor/bundle/gems/tins-1.13.2/tests/time_dummy_test.rb
tins-1.13.2 tests/time_dummy_test.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/tins-1.13.0/tests/time_dummy_test.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/tins-1.13.0/tests/time_dummy_test.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/tins-1.13.0/tests/time_dummy_test.rb
tins-1.13.0 tests/time_dummy_test.rb
tdiary-5.0.2 vendor/bundle/gems/tins-1.12.0/tests/time_dummy_test.rb
tins-1.12.0 tests/time_dummy_test.rb
tins-1.11.0 tests/time_dummy_test.rb
tdiary-5.0.1 vendor/bundle/gems/tins-1.10.2/tests/time_dummy_test.rb
tins-1.10.2 tests/time_dummy_test.rb
tins-1.10.1 tests/time_dummy_test.rb
tins-1.10.0 tests/time_dummy_test.rb
tins-1.9.0 tests/time_dummy_test.rb
tins-1.8.2 tests/time_dummy_test.rb
tins-1.8.1 tests/time_dummy_test.rb
tins-1.8.0 tests/time_dummy_test.rb
tins-1.7.0 tests/time_dummy_test.rb
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/tins-1.6.0/tests/time_dummy_test.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/tins-1.6.0/tests/time_dummy_test.rb