test/file_cache_test.rb in flannel-0.2.10 vs test/file_cache_test.rb in flannel-0.2.11
- old
+ new
@@ -3,23 +3,23 @@
class FileCacheTest < Test::Unit::TestCase
context "Creating File cache" do
should "require a location" do
begin
- cache = Flannel::FileCache.new
- assert_fail "should have raised ArgumentError"
+ cache = Flannel::FileCache.new
+ assert_fail "should have raised ArgumentError"
rescue ArgumentError => e
- assert true
+ assert true
end
end
should "require a valid location" do
begin
- cache = Flannel::FileCache.new "foo/bar"
- assert_fail "should have raised Flannel::CacheLocationDoesNotExistError"
+ cache = Flannel::FileCache.new "foo/bar"
+ assert_fail "should have raised Flannel::CacheLocationDoesNotExistError"
rescue Flannel::CacheLocationDoesNotExistError => e
- assert true
+ assert true
end
end
end
context "Generating a key" do
@@ -27,13 +27,13 @@
@cache = Flannel::FileCache.new "tmp"
end
should "be private" do
begin
- key = @cache.generate_key "http://example.com"
- assert_fail "generate_key should be private"
+ key = @cache.generate_key "http://example.com"
+ assert_fail "generate_key should be private"
rescue NoMethodError => e
- assert true
+ assert true
end
end
should "make MD5 hash" do
url = "http://example.com"
\ No newline at end of file