diff --git a/test/helper.rb b/test/helper.rb index 6b463ad..1e1a514 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -50,6 +50,6 @@ end def sleep_until(time) if (s = time - Time.now) > 0 - sleep s + sleep s + 0.01 end end diff --git a/test/test_http_cookie_jar.rb b/test/test_http_cookie_jar.rb index 969ee7f..e59c018 100644 --- a/test/test_http_cookie_jar.rb +++ b/test/test_http_cookie_jar.rb @@ -10,10 +10,8 @@ module TestHTTPCookieJar end def test_nonexistent_store_in_config - assert_raise_with_message( - ArgumentError, - /cookie store unavailable: :nonexistent, error: cannot load .*nonexistent_store/ - ) { + expected = /cookie store unavailable: :nonexistent, error: (cannot load|no such file to load) .*nonexistent_store/ + assert_raise_with_message(ArgumentError, expected) { HTTP::CookieJar.new(store: :nonexistent) } end