Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update specs to pass on webmock 1.10.1

  • Loading branch information...
commit d0b777ee67523a2d65ec9acfc0fd6652d196e163 1 parent 0ff9f48
Erik Michaels-Ober authored
2  Gemfile
View
@@ -16,7 +16,7 @@ group :test do
gem 'rspec', '>= 2.11'
gem 'simplecov', :require => false
gem 'timecop'
- gem 'webmock'
+ gem 'webmock', '>= 1.10.1'
end
gemspec
6 spec/twitter/api/geo_spec.rb
View
@@ -52,14 +52,14 @@
describe "#similar_places" do
before do
- stub_get("/1.1/geo/similar_places.json").with(:query => {:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter HQ"}).to_return(:body => fixture("places.json"), :headers => {:content_type => "application/json; charset=utf-8"})
+ stub_get("/1.1/geo/similar_places.json").with(:query => {:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter+HQ"}).to_return(:body => fixture("places.json"), :headers => {:content_type => "application/json; charset=utf-8"})
end
it "requests the correct resource" do
@client.similar_places(:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter HQ")
- expect(a_get("/1.1/geo/similar_places.json").with(:query => {:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter HQ"})).to have_been_made
+ expect(a_get("/1.1/geo/similar_places.json").with(:query => {:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter+HQ"})).to have_been_made
end
it "returns similar places" do
- places = @client.similar_places(:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter HQ")
+ places = @client.similar_places(:lat => "37.7821120598956", :long => "-122.400612831116", :name => "Twitter+HQ")
expect(places).to be_an Array
expect(places.first.name).to eq "Bernal Heights"
end
4 spec/twitter/api/users_spec.rb
View
@@ -513,11 +513,11 @@
describe "#user_search" do
before do
- stub_get("/1.1/users/search.json").with(:query => {:q => "Erik Michaels-Ober"}).to_return(:body => fixture("user_search.json"), :headers => {:content_type => "application/json; charset=utf-8"})
+ stub_get("/1.1/users/search.json").with(:query => {:q => "Erik+Michaels-Ober"}).to_return(:body => fixture("user_search.json"), :headers => {:content_type => "application/json; charset=utf-8"})
end
it "requests the correct resource" do
@client.user_search("Erik Michaels-Ober")
- expect(a_get("/1.1/users/search.json").with(:query => {:q => "Erik Michaels-Ober"})).to have_been_made
+ expect(a_get("/1.1/users/search.json").with(:query => {:q => "Erik+Michaels-Ober"})).to have_been_made
end
it "returns an array of user search results" do
user_search = @client.user_search("Erik Michaels-Ober")
Please sign in to comment.
Something went wrong with that request. Please try again.