diff --git a/test/test_http_cookie.rb b/test/test_http_cookie.rb index 80eb0da..d6a0a7c 100644 --- a/test/test_http_cookie.rb +++ b/test/test_http_cookie.rb @@ -50,7 +50,7 @@ class TestHTTPCookie < Test::Unit::TestCase silently do assert_equal 1, HTTP::Cookie.parse(cookie, url) { |c| assert c.expires, "Tried parsing: #{date}" - assert_equal(true, c.expires < yesterday) + assert_send [c.expires, :<, yesterday] }.size end end diff --git a/test/test_http_cookie_jar.rb b/test/test_http_cookie_jar.rb index ed3d64a..2e12633 100644 --- a/test/test_http_cookie_jar.rb +++ b/test/test_http_cookie_jar.rb @@ -582,15 +582,15 @@ module TestHTTPCookieJar time = Time.now - assert time > orig.accessed_at, "accessed_at is initialized to the current time" + assert_send [time, :>, orig.accessed_at], "accessed_at is initialized to the current time" cookie, = @jar.to_a - assert time > cookie.accessed_at, "accessed_at is not updated by each()" + assert_send [time, :>, cookie.accessed_at], "accessed_at is not updated by each()" cookie, = @jar.cookies("http://rubyforge.org/") - assert cookie.accessed_at > time, "accessed_at is not updated by each(url)" + assert_send [cookie.accessed_at, :>, time], "accessed_at is not updated by each(url)" end def test_max_cookies @@ -640,8 +640,8 @@ module TestHTTPCookieJar } } - assert_equal true, count > slimit - assert_equal true, @jar.to_a.size <= slimit + assert_send [count, :>, slimit] + assert_send [@jar.to_a.size, :<=, slimit] @jar.cleanup assert_equal hlimit, @jar.to_a.size assert_equal false, @jar.any? { |cookie|