diff --git a/lib/twitter/client/geo.rb b/lib/twitter/client/geo.rb index 7de2ecedd..30d4bb65d 100644 --- a/lib/twitter/client/geo.rb +++ b/lib/twitter/client/geo.rb @@ -44,7 +44,7 @@ def places_nearby(options={}) # @example Return an array of places similar to Twitter HQ # Twitter.places_similar(:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter HQ") def places_similar(options={}) - get('geo/similar_places', options)['result']['places'] + get('geo/similar_places', options)['result'] end # Searches for up to 20 places that can be used as a place_id diff --git a/spec/twitter/client/geo_spec.rb b/spec/twitter/client/geo_spec.rb index 3ec48f6d7..4f9fec663 100644 --- a/spec/twitter/client/geo_spec.rb +++ b/spec/twitter/client/geo_spec.rb @@ -46,8 +46,8 @@ it "should return similar places" do places = @client.places_similar(:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter HQ") - places.should be_an Array - places.first.name.should == "Bernal Heights" + places.should be_an Hash + places[:places].first.name.should == "Bernal Heights" end end