Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (20 sloc) 0.71 kb
38ff649 initial commit
Chad Pytel authored
1 TEST_ROOT = File.dirname(__FILE__)
2 $:.unshift(TEST_ROOT + '/../lib')
3
4 require 'rubygems'
5 require 'test/unit'
6 require 'active_record'
7 require 'active_record/fixtures'
a799422 make tests pass on newer active support
Chad Pytel authored
8 require 'active_support'
38ff649 initial commit
Chad Pytel authored
9 require File.join(TEST_ROOT, '/../init')
10
11 # Load database schema
12 config = YAML::load(IO.read(File.join(TEST_ROOT, 'database.yml')))
13 ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'plugin_test'])
14 schema = File.join(TEST_ROOT, 'schema.rb')
15 load schema if File.exists?(schema)
16
17 # Create a logger
18 ActiveRecord::Base.logger = Logger.new(File.join(TEST_ROOT, 'debug.log'))
19
20 # Test options
21 class Test::Unit::TestCase #:nodoc:
22 self.use_transactional_fixtures = true
23 self.use_instantiated_fixtures = false
a799422 make tests pass on newer active support
Chad Pytel authored
24 end
Something went wrong with that request. Please try again.