Sha256: a093fd5593282c911594221317a5afe48c4ba81698357bf1013d6ba7e8251e1f
Contents?: true
Size: 1.01 KB
Versions: 9
Compression:
Stored size: 1.01 KB
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe Biggs::Format do describe ".find" do context "known country with format" do subject { Biggs::Format.find("cn") } it{ should be_kind_of(Biggs::Format) } its(:country_name){ should eql("China") } its(:iso_code){ should eql("cn") } its(:format_string){ should eql("{{recipient}}\n{{street}}\n{{zip}} {{city}} {{state}}\n{{country}}") } end context "known country with unknown format" do subject { Biggs::Format.find("af") } it{ should be_kind_of(Biggs::Format) } its(:country_name){ should eql("Afghanistan") } its(:iso_code){ should eql("af") } its(:format_string){ should eql(nil) } end context "unknown country" do subject { Biggs::Format.find("xx") } it{ should be_kind_of(Biggs::Format) } its(:country_name){ should eql(nil) } its(:iso_code){ should eql("xx") } its(:format_string){ should eql(nil) } end end end
Version data entries
9 entries across 9 versions & 1 rubygems