Sha256: b73723be6ffe066363925d6ba0d3720963e9a50672ccf453fdd50065a2da30a3

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

require_relative '../../spec_helper'

describe Barometer::Query::Format::Zipcode do
  it ".country_code" do
    Barometer::Query::Format::Zipcode.country_code(nil).should == "US"
    Barometer::Query::Format::Zipcode.country_code("ignored").should == "US"
  end

  describe ".is?" do
    it "recognizes a valid format" do
      Barometer::Query::Format::Zipcode.is?("90210-5555").should be_true
    end

    it "recognizes non-valid format" do
      Barometer::Query::Format::Zipcode.is?("invalid").should be_false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
barometer-0.9.1 spec/query/formats/zipcode_spec.rb
barometer-0.9.0 spec/query/formats/zipcode_spec.rb