Sha256: b7f5e4b4ad154ea1ad54cdc1aeeafe82ae784510e8c57f6f0f87fa80dc890678
Contents?: true
Size: 783 Bytes
Versions: 7
Compression:
Stored size: 783 Bytes
Contents
require 'spec_helper' describe Torasup do describe "#prefixes" do let(:prefixes) { described_class.prefixes } context "metadata" do it "should include the correct min, max and pattern values" do with_operators do |number_parts, assertions| prefix = assertions["country_code"].to_s + assertions["area_code"].to_s + assertions["prefix"].to_s prefix_metadata = prefixes[prefix] local_number = assertions["local_number"] expect(local_number.to_i).to be >= prefix_metadata["subscriber_number_min"] expect(local_number.to_i).to be <= prefix_metadata["subscriber_number_max"] expect(local_number).to match(Regexp.new(prefix_metadata["subscriber_number_pattern"])) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems