spec/lib/state_spec.rb in geolookup-0.5.1 vs spec/lib/state_spec.rb in geolookup-0.5.2
- old
+ new
@@ -19,9 +19,21 @@
it "should return nil if no state abbreviation" do
expect(Geolookup::USA::State.name_to_abbreviation('asdf')).to be_nil
end
end
+ describe "#state_abbreviations" do
+ it "should return an array of state abbreviation" do
+ expect(Geolookup::USA::State.abbreviations).to include("CA")
+ end
+ end
+
+ describe "#names" do
+ it "should return an array of state names" do
+ expect(Geolookup::USA::State.names).to include("California")
+ end
+ end
+
describe "#code_to_abbreviation" do
it 'should return a state abbreviation gien a state code' do
expect(Geolookup::USA::State.code_to_abbreviation(1)).to eql("AL")
end
\ No newline at end of file