test/proxy_test.rb in rufus-verbs-0.1 vs test/proxy_test.rb in rufus-verbs-0.2
- old
+ new
@@ -18,26 +18,23 @@
include Rufus::Verbs
def test_0
- res0 = get(
- "http://en.wikipedia.org/wiki/Ruby_%28programming_language%29",
- :proxy => false)
+ uri = "http://rufus.rubyforge.org/rufus-verbs/index.html"
+ res0 = get(uri, :proxy => false)
+
assert_not_nil res0.body # just displaying the test dot
proxies = find_proxies
res1 = nil
proxies.each do |proxy|
begin
Timeout::timeout 2 do
- res1 = get(
- "http://en.wikipedia.org/wiki/"+
- "Ruby_%28programming_language%29",
- :proxy => proxy)
+ res1 = get(uri, :proxy => proxy)
end
break if res1.code.to_i == 200
rescue Exception => e
puts "skipped proxy '#{proxy}'"
end