Sha256: 57e609df84489e12bf700a423d6c7a01b299da7315f10cd969bd3f6234fca50f
Contents?: true
Size: 633 Bytes
Versions: 33
Compression:
Stored size: 633 Bytes
Contents
# frozen_string_literal: true 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
33 entries across 33 versions & 1 rubygems