Sha256: 175bfeffad0670c60c5236bc393c500b8dc15622c25eef1a076595e475ee5dbe

Contents?: true

Size: 610 Bytes

Versions: 3

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Gman::Locality do
  context 'valid domains' do
    ['foo.state.il.us', 'ci.foo.il.us'].each do |domain|
      context "the #{domain} domain" do
        it 'is valid' do
          expect(described_class.valid?(domain)).to be(true)
        end
      end
    end
  end

  context 'invalid domains' do
    ['state.foo.il.us', 'foo.ci.il.us',
     'k12.il.us', 'ci.foo.zx.us'].each do |domain|
       context "the #{domain} domain" do
         it 'is invalid' do
           expect(described_class.valid?(domain)).to be(false)
         end
       end
     end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gman-7.0.6 spec/gman/locality_spec.rb
gman-7.0.5 spec/gman/locality_spec.rb
gman-7.0.4 spec/gman/locality_spec.rb