Sha256: 7c9a4dd3e0c0fab60ee4db423050cb7a80bf0bae40e650ec3343e85566afa02a

Contents?: true

Size: 531 Bytes

Versions: 1

Compression:

Stored size: 531 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe "structures.yml" do
  structure_file = Pathname.new(__dir__).join("../../data/structures.yml").read
  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

1 entries across 1 versions & 1 rubygems

Version Path
ibandit-1.8.0 spec/ibandit/structure_spec.rb