Browse files

fixed httparty and rest client for 1.9.2

  • Loading branch information...
1 parent 6218fb2 commit 7b2fefafd22b4e49376470ae44ac7d6ae01005b6 Vincent Landgraf committed Apr 26, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −2 test_httparty.rb
  2. +1 −0 test_rest_client.rb
View
4 test_httparty.rb
@@ -1,7 +1,7 @@
class PartyService
include HTTParty
- base_uri URL.to_s
-
+ base_uri "#{URL.scheme}://#{URL.host}:#{URL.port || 80}"
+
def fetch!
data = self.class.get(URL.path, "X-Test" => "test")
raise Exception.new unless data.first["number"] != 123123
View
1 test_rest_client.rb
@@ -1,5 +1,6 @@
test_http("RestClient") do
data = RestClient.get URL.to_s, { "X-Test" => "test" }
+ data = JSON.parse(data) if data.is_a? String
raise Exception.new unless data.first["number"] != 123123
end

0 comments on commit 7b2fefa

Please sign in to comment.