test/proxy_test.rb in rufus-verbs-0.6 vs test/proxy_test.rb in rufus-verbs-0.7
- old
+ new
@@ -54,9 +54,21 @@
assert_equal res0.body.length, res1.body.length
#p res0.to_hash
#p res1.to_hash
+ via1 = res1["via"]
+
+ unless via1
+ puts
+ puts
+ puts "seems like no open proxy could be found... no via..."
+ puts "can't test for now"
+ puts
+ puts
+ return
+ end
+
via1 = res1["via"].split(", ")[-1]
# last proxy
assert_no_match /wikimedia\.org/, via1
# making sure that the proxy was not one of wikipedia