spec/session_spec.rb in patron-0.12.1 vs spec/session_spec.rb in patron-0.13.1

- old
+ new

@@ -171,10 +171,15 @@ @session.get("/") end it "should raise an exception on timeout" do @session.timeout = 1 - expect {@session.get("/timeout")}.to raise_error(Patron::TimeoutError) + expect {@session.get("/timeout?millis=1100")}.to raise_error(Patron::TimeoutError) + end + + it "should raise an exception on a sub-second timeout" do + @session.timeout = 0.3 + expect {@session.get("/timeout?millis=400")}.to raise_error(Patron::TimeoutError) end it "should raise an exception on timeout when reading from a slow resource" do @session.timeout = 40 @session.low_speed_time = 2