Sha256: 098d21ef751bd9c5efa2483e85d67afcef10a4f98a7c4153bf1f7cff981e3b40

Contents?: true

Size: 858 Bytes

Versions: 2

Compression:

Stored size: 858 Bytes

Contents

require 'rubygems'
require 'test/unit'
require 'fileutils'
require "active_record"
require 'logger'

# ------------------------------------------------------
# Setup AR environment
# ------------------------------------------------------

# Define connection info
ActiveRecord::Base.configurations = {
  "test" => {
    :adapter  => 'sqlite3',
    :database => ':memory:'
  }
}
ActiveRecord::Base.establish_connection("test")

# Setup logger
tmp = File.expand_path('../../tmp', __FILE__)
FileUtils.mkdir_p(tmp)
ActiveRecord::Base.logger = Logger.new("#{tmp}/debug.log")


# ------------------------------------------------------
# Inject audit-trascer
#   and setup test schema
#   and define models used in tests
# ------------------------------------------------------
require "ar-audit-tracer"

require "resources/schema.rb"
require "resources/models.rb"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ar-audit-tracer-0.2.0 test/helper.rb
ar-audit-tracer-0.1.0 test/helper.rb