mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
Rename HTTP::Cookie#clear! to clear.
This commit is contained in:
parent
fe65dbfb89
commit
aa64d3d98b
2 changed files with 5 additions and 5 deletions
|
|
@ -156,7 +156,7 @@ class HTTP::CookieJar
|
||||||
end
|
end
|
||||||
|
|
||||||
# Clear the cookie jar
|
# Clear the cookie jar
|
||||||
def clear!
|
def clear
|
||||||
@jar = {}
|
@jar = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
|
||||||
assert_equal(0, @jar.cookies(url).length)
|
assert_equal(0, @jar.cookies(url).length)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_clear_bang
|
def test_clear
|
||||||
url = URI 'http://rubyforge.org/'
|
url = URI 'http://rubyforge.org/'
|
||||||
|
|
||||||
# Add one cookie with an expiration date in the future
|
# Add one cookie with an expiration date in the future
|
||||||
|
|
@ -263,7 +263,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
|
||||||
@jar.add(url, HTTP::Cookie.new(cookie_values(:name => 'Baz')))
|
@jar.add(url, HTTP::Cookie.new(cookie_values(:name => 'Baz')))
|
||||||
assert_equal(2, @jar.cookies(url).length)
|
assert_equal(2, @jar.cookies(url).length)
|
||||||
|
|
||||||
@jar.clear!
|
@jar.clear
|
||||||
|
|
||||||
assert_equal(0, @jar.cookies(url).length)
|
assert_equal(0, @jar.cookies(url).length)
|
||||||
end
|
end
|
||||||
|
|
@ -448,7 +448,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
|
||||||
|
|
||||||
in_tmpdir do
|
in_tmpdir do
|
||||||
@jar.save_as("cookies.txt", :cookiestxt)
|
@jar.save_as("cookies.txt", :cookiestxt)
|
||||||
@jar.clear!
|
@jar.clear
|
||||||
|
|
||||||
@jar.load("cookies.txt", :cookiestxt)
|
@jar.load("cookies.txt", :cookiestxt)
|
||||||
end
|
end
|
||||||
|
|
@ -463,7 +463,7 @@ class TestHTTPCookieJar < Test::Unit::TestCase
|
||||||
|
|
||||||
in_tmpdir do
|
in_tmpdir do
|
||||||
@jar.save_as("cookies.txt", :cookiestxt)
|
@jar.save_as("cookies.txt", :cookiestxt)
|
||||||
@jar.clear!
|
@jar.clear
|
||||||
|
|
||||||
@jar.load("cookies.txt", :cookiestxt)
|
@jar.load("cookies.txt", :cookiestxt)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue