Sha256: 26a62541e23172d870a2880293bfc8d606d654a2b8f0771bcb8fc990f442ac30
Contents?: true
Size: 615 Bytes
Versions: 11
Compression:
Stored size: 615 Bytes
Contents
require 'timezone/lookup/test' require 'timezone' require 'minitest/autorun' class TestTest < ::Minitest::Test parallelize_me! def lookup Timezone::Lookup::Test.new(OpenStruct.new) end def test_simple_stub mine = lookup mine.stub(-10, 10, 'America/Los_Angeles') assert_equal 'America/Los_Angeles', mine.lookup(-10, 10) end def test_missing_stub assert_raises(::Timezone::Error::Test) do lookup.lookup(100, 100) end end def test_default_stub mine = lookup mine.default('America/Toronto') assert_equal 'America/Toronto', mine.lookup(-12, 12) end end
Version data entries
11 entries across 11 versions & 1 rubygems