test/tc_managed_entries.rb in zip-container-0.8.0 vs test/tc_managed_entries.rb in zip-container-0.9.0
- old
+ new
@@ -84,31 +84,31 @@
# Check that the example ZipContainer file does not validate as a
# ManagedZipContainer.
def test_fail_verification
refute(ManagedZipContainer.verify($example))
- assert_raises(ZipContainer::MalformedZipContainerError) do
+ assert_raises(ZipContainer::MalformedContainerError) do
ManagedZipContainer.verify!($example)
end
end
# Check that the example ZipContainer file does validate as an
# ExampleZipContainer.
def test_pass_verification
assert(ExampleZipContainer.verify($example))
- assert_nothing_raised(ZipContainer::MalformedZipContainerError) do
+ assert_nothing_raised(ZipContainer::MalformedContainerError) do
ExampleZipContainer.verify!($example)
end
end
# Check that the example ZipContainer file does validate as an
# ExampleZipContainer2.
def test_pass_verification_2
assert(ExampleZipContainer2.verify($example))
- assert_nothing_raised(ZipContainer::MalformedZipContainerError) do
+ assert_nothing_raised(ZipContainer::MalformedContainerError) do
ExampleZipContainer2.verify!($example)
end
end
# Check that a standard Container can be created
@@ -126,11 +126,11 @@
end
assert(c.file.exists?("META-INF/container.xml"))
end
end
- assert_nothing_raised(ZipContainer::MalformedZipContainerError) do
+ assert_nothing_raised(ZipContainer::MalformedContainerError) do
ZipContainer::Container.verify!(filename)
end
end
end
@@ -140,18 +140,18 @@
Dir.mktmpdir do |dir|
filename = File.join(dir, "test.container")
assert_nothing_raised do
ManagedZipContainer.create(filename, $mimetype) do |c|
- assert_raises(ZipContainer::MalformedZipContainerError) do
+ assert_raises(ZipContainer::MalformedContainerError) do
c.verify!
end
end
end
refute(ManagedZipContainer.verify(filename))
- assert_raises(ZipContainer::MalformedZipContainerError) do
+ assert_raises(ZipContainer::MalformedContainerError) do
ManagedZipContainer.verify!(filename)
end
end
end
@@ -169,11 +169,11 @@
end
end
end
assert(ManagedZipContainer.verify(filename))
- assert_nothing_raised(ZipContainer::MalformedZipContainerError) do
+ assert_nothing_raised(ZipContainer::MalformedContainerError) do
ManagedZipContainer.verify!(filename)
end
end
end
@@ -196,33 +196,33 @@
Dir.mktmpdir do |dir|
filename = File.join(dir, "test.container")
assert_nothing_raised do
ExampleZipContainer2.create(filename) do |c|
- assert_raises(ZipContainer::MalformedZipContainerError) do
+ assert_raises(ZipContainer::MalformedContainerError) do
c.verify!
end
c.file.open("greeting.txt", "w") do |f|
f.puts "Goodbye!"
end
- assert_raises(ZipContainer::MalformedZipContainerError) do
+ assert_raises(ZipContainer::MalformedContainerError) do
c.verify!
end
c.file.open("greeting.txt", "w") do |f|
f.puts "Hello, Y'All!"
end
- assert_nothing_raised(ZipContainer::MalformedZipContainerError) do
+ assert_nothing_raised(ZipContainer::MalformedContainerError) do
c.verify!
end
end
end
assert(ExampleZipContainer2.verify(filename))
- assert_nothing_raised(ZipContainer::MalformedZipContainerError) do
+ assert_nothing_raised(ZipContainer::MalformedContainerError) do
ExampleZipContainer2.verify!(filename)
end
end
end