class TestBackupBDB
Public Instance Methods
setup()
click to toggle source
# File vendor/qwik/lib/qwik/db-b-backup.rb, line 108 def setup @config = Qwik::Config.new @config[:db] = 'bdb' @dir = 'test/'.path @dir.setup path = @dir spath = @config.super_dir.path @pagedb = Qwik::BerkeleyDB.new(path, spath) end
teardown()
click to toggle source
# File vendor/qwik/lib/qwik/db-b-backup.rb, line 118 def teardown @pagedb.close if @pagedb @dir.teardown end
test_backupdb()
click to toggle source
# File vendor/qwik/lib/qwik/db-b-backup.rb, line 123 def test_backupdb @pagedb.create('1') @pagedb.put('1', 't', Time.at(1)) budb = @pagedb.backupdb assert_instance_of(Qwik::BackupBDB, budb) budb.each_by_key('1') {|v, time| assert_instance_of(String, v) assert_instance_of(Time, time) s = budb.get('1', time) assert_instance_of(String, s) eq v, s } #put #exist? end