Sha256: bb6f1aba635fd4b2a50c70e3bcd870b39b44b8380e7011bb8446fd90f9b6a1d7
Contents?: true
Size: 431 Bytes
Versions: 13
Compression:
Stored size: 431 Bytes
Contents
class Baza::InfoSqlite3 def self.sample_db require "sqlite3" path = "#{Dir.tmpdir}/baza_sqlite3_test.sqlite3_#{Time.now.to_f.to_s.hash}" File.unlink(path) if File.exists?(path) db = Baza::Db.new( :type => :sqlite3, :path => path, :index_append_table_name => true, :sql_to_error => true ) begin yield db ensure db.close File.unlink(path) end end end
Version data entries
13 entries across 13 versions & 1 rubygems