Sha256: 6ca3d457715e6d8f5e3d6b221dee776e87e2e11d781549e44da5d64376058e7d

Contents?: true

Size: 858 Bytes

Versions: 5

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

5 entries across 5 versions & 1 rubygems

Version Path
ar-audit-tracer-2.0.1 test/helper.rb
ar-audit-tracer-2.0.0 test/helper.rb
ar-audit-tracer-1.0.2 test/helper.rb
ar-audit-tracer-1.0.1 test/helper.rb
ar-audit-tracer-1.0.0 test/helper.rb