Skip to content

Commit

Permalink
refactor: places_similar returns the token used on places creation
Browse files Browse the repository at this point in the history
  • Loading branch information
nsanta authored and sferik committed Feb 3, 2011
1 parent dffe31c commit 351e224
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/twitter/client/geo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/twitter/client/geo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 351e224

Please sign in to comment.