Sha256: a2ccf087759dd01c50cdd0d43b5481a5ab7ac271b087d6477eb8e3062822f457
Contents?: true
Size: 602 Bytes
Versions: 4
Compression:
Stored size: 602 Bytes
Contents
require 'timezone/lookup/basic' require 'minitest/autorun' require 'ostruct' class BasicLookupTest < ::Minitest::Test parallelize_me! def config @config ||= OpenStruct.new(protocol: 'http', url: 'example.com') end def lookup ::Timezone::Lookup::Basic.new(config) end def test_missing_protocol config.protocol = nil assert_raises(::Timezone::Error::InvalidConfig) { lookup } end def test_missing_url config.url = nil assert_raises(::Timezone::Error::InvalidConfig) { lookup } end def test_initialization assert_equal lookup.config, config end end
Version data entries
4 entries across 4 versions & 1 rubygems