spec/zippopotamus_spec.rb in zippopotamus-client-0.1.1 vs spec/zippopotamus_spec.rb in zippopotamus-client-0.2.0

- old
+ new

@@ -5,16 +5,17 @@ context "VCR enabled tests" do context "valid postal_code with single Place returned" do before do VCR.use_cassette 'us_90210' do - @result = Zippopotamus.lookup_postal_code!('90210') + @result = Zippopotamus.lookup_zipcode('90210') end end it "returns correct data" do @result.should be_a(Zippopotamus::Place) + @result.postcode.should == '90210' @result.name.should == 'Beverly Hills' @result.region.should == 'California' @result.region_code.should == 'CA' @result.latitude.should be_within(2.0).of(34.0) @result.longitude.should be_within(2.0).of(-118.4) @@ -24,11 +25,11 @@ context "valid postal_code with multiple Places returned" do before do VCR.use_cassette 'fr_01000' do - @result = Zippopotamus.lookup_postal_code!('01000', 'fr') + @result = Zippopotamus.lookup_postcode('01000', 'fr') end end it "returns correct data" do @result.should be_a(Zippopotamus::Place) @@ -60,17 +61,18 @@ end - context "live HTTP tests with US/90210 valid data" do + context "live HTTP tests with US/90210" do before do - @result = Zippopotamus.lookup_postal_code!('90210') + @result = Zippopotamus.lookup_zipcode('90210') end it "returns correct data" do @result.should be_a(Zippopotamus::Place) + @result.postcode.should == '90210' @result.name.should == 'Beverly Hills' @result.region.should == 'California' @result.region_code.should == 'CA' @result.latitude.should be_within(2.0).of(34.0) @result.longitude.should be_within(2.0).of(-118.4)