Sha256: 273077ec50ea25f8afc21e3581e6bc1d9f198d10c4ee1bd3dee6460a70d0858c

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

require 'rubygems'
require 'fileutils'
require 'activerecord'
require 'test/unit'
require 'active_record/test_case'
begin
  require 'mysqlplus'
rescue LoadError
end

spec_dir = File.join(File.dirname(__FILE__), '..', 'spec')

ActiveRecord::Base.logger = Logger.new(File.join(spec_dir, "..", "debug.log"))

databases = YAML::load(IO.read(spec_dir + "/db/database.yml"))
db_info = databases[ENV["DB"] || "test"]
ActiveRecord::Base.establish_connection(db_info)

require spec_dir + '/../lib/hornsby'
require spec_dir + '/db/fruit'
require spec_dir + '/db/tree'

class ActiveSupport::TestCase
  enable_hornsby :root => File.join(File.dirname(__FILE__), '..'), :scenarios => :big_cherry
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hornsby-0.4.2 test/test_helper.rb