Sha256: 890b668de739cb10a0270615ac15cf39fe222df073c2766befdcb8ef173b8e82

Contents?: true

Size: 706 Bytes

Versions: 4

Compression:

Stored size: 706 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

module Europe
  module Countries
    # CountryTest
    class CountryTest < Minitest::Test
      include Benchmark

      def test_country_by_name
        reversed_hash =
          Europe::Countries::Reversed.generate(:name)
        assert_equal reversed_hash['Netherlands'], :NL
        assert_equal reversed_hash['Ireland'], :IE

        reversed_hash =
          Europe::Countries::Reversed.generate(:currency)
        assert_equal reversed_hash[:EUR].count, 17
      end

      def test_eurozone
        assert Europe::Countries.eurozone.include?(:DE)
        assert_equal false, Europe::Countries.eurozone.include?(:UK)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
europe-0.0.17 test/europe/countries/country_test.rb
europe-0.0.16 test/europe/countries/country_test.rb
europe-0.0.15 test/europe/countries/country_test.rb
europe-0.0.14 test/europe/countries/country_test.rb