Sha256: f94971ace3f7e53660633925f6ee12da503433f4ca8bd6bfbac6b3d510be6828
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Barometer::WebService::Geocode, :vcr => { :cassette_name => "WebService::Geocode" } do before(:each) do @zipcode = "90210" end describe "and the class methods" do describe "fetch," do it "requires a Query object" do lambda { Barometer::WebService::Geocode.fetch }.should raise_error(ArgumentError) lambda { Barometer::WebService::Geocode.fetch("invalid") }.should raise_error(ArgumentError) query = Barometer::Query.new(@zipcode) query.is_a?(Barometer::Query).should be_true lambda { Barometer::WebService::Geocode.fetch(query) }.should_not raise_error(ArgumentError) end it "queries (key no longer required)" do query = Barometer::Query.new(@zipcode) Barometer::WebService::Geocode.fetch(query).should_not be_nil end it "returns a Geo object" do query = Barometer::Query.new(@zipcode) Barometer::WebService::Geocode.fetch(query).is_a?(Data::Geo).should be_true end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
barometer-0.8.0 | spec/web_services/geocode_spec.rb |