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
tins-1.34.0 tests/time_dummy_test.rb
tins-1.33.0 tests/time_dummy_test.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/time_dummy_test.rb
tins-1.32.1 tests/time_dummy_test.rb
tins-1.32.0 tests/time_dummy_test.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/time_dummy_test.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/tins-1.31.1/tests/time_dummy_test.rb
tins-1.31.1 tests/time_dummy_test.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/tins-1.31.0/tests/time_dummy_test.rb
tins-1.31.0 tests/time_dummy_test.rb
tins-1.30.0 tests/time_dummy_test.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/time_dummy_test.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/tests/time_dummy_test.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/time_dummy_test.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/tests/time_dummy_test.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tins-1.26.0/tests/time_dummy_test.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tins-1.28.0/tests/time_dummy_test.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/tins-1.29.1/tests/time_dummy_test.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/tins-1.26.0/tests/time_dummy_test.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tins-1.29.1/tests/time_dummy_test.rb