Sha256: 821644e845c4f9bc0718ec3eaae2a0d0a33d1d7d9bd7cd3155bab7619139a552
Contents?: true
Size: 732 Bytes
Versions: 1
Compression:
Stored size: 732 Bytes
Contents
require 'active_record' require 'active_record/fixtures' ActiveRecord::Base.logger = Logger.new(File.join(RAILS_ROOT, 'test.log')) # Load the database.yml from #{plugin_path}/test/config if it exists if file = PTK::Configuration.find_path(:database) config = YAML::load_file(file) ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite3']) # Load a schema if it exists if schema = PTK::Configuration.find_path(:schema) load(schema) # Setup fixtures if the directory exists if fixtures = PTK::Configuration.find_path(:fixtures) PTK::LoadPath.add fixtures Test::Unit::TestCase.fixture_path = fixtures Test::Unit::TestCase.use_instantiated_fixtures = false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
compages-0.4.0 | vendor/plugins/unobtrusive_javascript/test/lib/ptk/gem/active_record.rb |