Sha256: a6e373a0192ddeae8692b9076b710a170d457b486e5e39e606ca35fd47767516

Contents?: true

Size: 489 Bytes

Versions: 15

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe "structures.yml" do
  structure_file = File.expand_path("../../data/structures.yml", __dir__)
  structures = YAML.load_file(structure_file)

  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

15 entries across 15 versions & 1 rubygems

Version Path
ibandit-1.7.1 spec/ibandit/structure_spec.rb
ibandit-1.7.0 spec/ibandit/structure_spec.rb
ibandit-1.6.1 spec/ibandit/structure_spec.rb
ibandit-1.6.0 spec/ibandit/structure_spec.rb
ibandit-1.5.0 spec/ibandit/structure_spec.rb
ibandit-1.4.1 spec/ibandit/structure_spec.rb
ibandit-1.4.0 spec/ibandit/structure_spec.rb
ibandit-1.3.0 spec/ibandit/structure_spec.rb
ibandit-1.2.3 spec/ibandit/structure_spec.rb
ibandit-1.2.2 spec/ibandit/structure_spec.rb
ibandit-1.2.0 spec/ibandit/structure_spec.rb
ibandit-1.2.1 spec/ibandit/structure_spec.rb
ibandit-1.1.0.1 spec/ibandit/structure_spec.rb
ibandit-1.1.0 spec/ibandit/structure_spec.rb
ibandit-1.0.2 spec/ibandit/structure_spec.rb