spec/formats/coordinates_spec.rb in barometer-0.6.7 vs spec/formats/coordinates_spec.rb in barometer-0.7.0

- old
+ new

@@ -151,8 +151,24 @@ Barometer.google_geocode_key = KEY end end + describe "parsing" do + + it "returns the latitude" do + Barometer::Query::Format::Coordinates.parse_latitude(@coordinates).should == "40.756054" + end + + it "returns the longitude" do + Barometer::Query::Format::Coordinates.parse_longitude(@coordinates).should == "-73.986951" + end + + it "returns nil when unknown" do + Barometer::Query::Format::Coordinates.parse_longitude(@short_zipcode).should be_nil + end + + end + end end \ No newline at end of file