1 require File.dirname(__FILE__) + '/../../../spec_helper'
4 describe "Net::HTTP#open_timeout" do
5 it "returns the seconds to wait till the connection is open" do
6 net = Net::HTTP.new("localhost")
7 net.open_timeout.should be_nil
9 net.open_timeout.should eql(10)
13 describe "Net::HTTP#open_timeout=" do
14 it "sets the seconds to wait till the connection is open" do
15 net = Net::HTTP.new("localhost")
17 net.open_timeout.should eql(10)
20 it "returns the newly set value" do
21 net = Net::HTTP.new("localhost")
22 (net.open_timeout = 10).should eql(10)