Sha256: 4aefc3a9ee578d6ee17118f6adeed229c8bab15f3a0faf5335ff8596e9f07251

Contents?: true

Size: 1016 Bytes

Versions: 2

Compression:

Stored size: 1016 Bytes

Contents

require 'rubygems'
require 'minitest/autorun'
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")

# I18n
I18n.load_path += Dir[File.expand_path('resources/locale/*.yml', File.dirname(__FILE__))]
I18n.default_locale = :en

puts :i18n_load => I18n.load_path

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
code-box-1.1.3 test/helper.rb
code-box-1.1.2 test/helper.rb