Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactor: places_similar returns the token used on places creation

  • Loading branch information...
commit 351e2240717a34d6575a802078077a1681fa4616 1 parent dffe31c
@nsanta nsanta authored committed
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/twitter/client/geo.rb
  2. +2 −2 spec/twitter/client/geo_spec.rb
View
2  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
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.