To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 4d / 4d0caccad592aa075ffb7a4bf6b9da87412b6d59.svn-base @ 1298:4f746d8966dd
History | View | Annotate | Download (962 Bytes)
| 1 |
$:.unshift(File.dirname(__FILE__) + '/../lib') |
|---|---|
| 2 |
plugin_test_dir = File.dirname(__FILE__) |
| 3 |
|
| 4 |
require 'rubygems' |
| 5 |
require 'test/unit' |
| 6 |
require 'multi_rails_init' |
| 7 |
# gem 'activerecord', '>= 2.0' |
| 8 |
require 'active_record' |
| 9 |
require 'action_controller' |
| 10 |
require 'action_view' |
| 11 |
require 'active_record/fixtures' |
| 12 |
|
| 13 |
require plugin_test_dir + '/../init.rb' |
| 14 |
|
| 15 |
ActiveRecord::Base.logger = Logger.new(plugin_test_dir + "/debug.log") |
| 16 |
|
| 17 |
ActiveRecord::Base.configurations = YAML::load(IO.read(plugin_test_dir + "/db/database.yml")) |
| 18 |
ActiveRecord::Base.establish_connection(ENV["DB"] || "sqlite3mem") |
| 19 |
ActiveRecord::Migration.verbose = false |
| 20 |
load(File.join(plugin_test_dir, "db", "schema.rb")) |
| 21 |
|
| 22 |
Dir["#{plugin_test_dir}/fixtures/*.rb"].each {|file| require file }
|
| 23 |
|
| 24 |
|
| 25 |
class Test::Unit::TestCase #:nodoc: |
| 26 |
self.fixture_path = File.dirname(__FILE__) + "/fixtures/" |
| 27 |
self.use_transactional_fixtures = true |
| 28 |
self.use_instantiated_fixtures = false |
| 29 |
|
| 30 |
fixtures :categories, :notes, :departments |
| 31 |
end |