test/test.rb in daybreak-0.1.0 vs test/test.rb in daybreak-0.1.1
- old
+ new
@@ -109,9 +109,17 @@
db2 = Daybreak::DB.new DB_PATH
assert !db2.has_key?('two')
assert_equal db2['two'], nil
end
+ it "should close and reopen the file when clearing the database" do
+ begin
+ 1000.times {@db.clear}
+ rescue
+ flunk
+ end
+ end
+
after do
@db.empty!
@db.close!
end
end