Sha256: 19384036283a4d652711fe59e607a1176d157d9723c0d1954f4200413bb4eea0

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 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', :dbfile  => ':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

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-1.12.2 test/connections/native_sqlite3/in_memory_connection.rb
activerecord-1.12.1 test/connections/native_sqlite3/in_memory_connection.rb