Sha256: a7909174940ec2ab3bd4d6660d514f367bf43fb5bd7f34c5f61b263cd92dd87b

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

print "Using native SQLite3\n"
require 'fixtures/course'
require 'logger'
ActiveRecord::Base.logger = Logger.new("debug.log")

class SqliteError < StandardError
end

def make_connection(clazz, db_definitions_file)
  clazz.establish_connection(:adapter => 'sqlite3', :database  => ':memory:')
  File.read("#{File.dirname(__FILE__)}/../../fixtures/db_definitions/#{db_definitions_file}").split(';').each do |command|
    clazz.connection.execute(command) unless command.strip.empty?
  end
end

make_connection(ActiveRecord::Base, 'sqlite.sql')
make_connection(Course, 'sqlite2.sql')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-1.13.0 test/connections/native_sqlite3/in_memory_connection.rb