Sha256: 61aaea247735bbf8909621966cf1b818f6b8f3c3e1b89d4fdfa0c288ecbf22b1

Contents?: true

Size: 704 Bytes

Versions: 3

Compression:

Stored size: 704 Bytes

Contents

  describe 'global Country class', order: :defined do
    context "when loaded via 'iso3166' existance" do
      subject { defined?(Country) }

      it { is_expected.to be_falsey }
    end

    context "when loaded via 'global'" do
      before { require 'countries/global' }

      describe 'existance' do
        subject { defined?(Country) }

        it { is_expected.to be_truthy }
      end

      describe 'superclass' do
        subject { Country.superclass }

        it { is_expected.to eq(ISO3166::Country) }
      end

      describe 'to_s' do
        it 'should return the country name' do
          expect(Country.new('GB').to_s).to eq('United Kingdom')
        end
      end
    end
  end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
countries-2.0.0.rc spec/global_spec.rb
countries-2.0.0.pre.4 spec/global_spec.rb
countries-2.0.0.pre.3 spec/global_spec.rb