Sha256: 691226db74390dc00be91a7e65af41c4df10e168c359c40e2422a2d73d23b386

Contents?: true

Size: 536 Bytes

Versions: 14

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe "structures.yml" do
  structure_file = File.read(File.expand_path("../../data/structures.yml", __dir__))
  structures = YAML.safe_load(structure_file, permitted_classes: [Range, Symbol])

  structures.each do |country, rules|
    context country do
      rules.each do |rule, value|
        next unless rule.to_s.end_with?("_format")

        it "builds #{rule} rule" do
          expect { Regexp.new(value) }.to_not raise_exception
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ibandit-1.21.0 spec/ibandit/structure_spec.rb
ibandit-1.20.0 spec/ibandit/structure_spec.rb
ibandit-1.19.0 spec/ibandit/structure_spec.rb
ibandit-1.18.0 spec/ibandit/structure_spec.rb
ibandit-1.17.0 spec/ibandit/structure_spec.rb
ibandit-1.16.0 spec/ibandit/structure_spec.rb
ibandit-1.15.0 spec/ibandit/structure_spec.rb
ibandit-1.14.0 spec/ibandit/structure_spec.rb
ibandit-1.13.0 spec/ibandit/structure_spec.rb
ibandit-1.12.0 spec/ibandit/structure_spec.rb
ibandit-1.11.0 spec/ibandit/structure_spec.rb
ibandit-1.10.0 spec/ibandit/structure_spec.rb
ibandit-1.9.0 spec/ibandit/structure_spec.rb
ibandit-1.8.1 spec/ibandit/structure_spec.rb