test/timeout_test.rb in rufus-verbs-0.10 vs test/timeout_test.rb in rufus-verbs-1.0.0

- old
+ new

@@ -5,34 +5,30 @@ # jmettraux@gmail.com # # Mon May 26 17:04:25 JST 2008 # -require 'rubygems' +require File.dirname(__FILE__) + '/base.rb' -require 'test/unit' -require 'testbase' -require 'rufus/verbs' - - class TimeoutTest < Test::Unit::TestCase - include TestBaseMixin + include TestBaseMixin - include Rufus::Verbs + include Rufus::Verbs - def test_0 + def test_0 - error = nil - t = Time.now + error = nil + t = Time.now - begin - get :uri => "http://localhost:7777/lost", :to => 1 - rescue Timeout::Error => e - error = e - end - - assert_not_nil error - assert (Time.now - t < 2) + begin + get :uri => "http://localhost:7777/lost", :to => 1 + rescue Timeout::Error => e + error = e end + + assert_not_nil error + assert (Time.now - t < 2) + end end +