Sha256: ddd86e5768bc6f6cbf3d89e05db190668c3a15f9d1d15c230010cde7e3318941
Contents?: true
Size: 873 Bytes
Versions: 8
Compression:
Stored size: 873 Bytes
Contents
require 'test/unit' require 'ruby-debug' require 'active_record' require 'active_record/test_case' require 'active_record/fixtures' ROOT = File.dirname(File.dirname(File.dirname(__FILE__))) require "#{ROOT}/rails/init" class ActiveSupport::TestCase include ActiveRecord::TestFixtures self.fixture_path = "#{ROOT}/test/fixtures" self.use_instantiated_fixtures = false self.use_transactional_fixtures = true def create_fixtures(*table_names, &block) Fixtures.create_fixtures(ActiveSupport::TestCase.fixture_path, table_names, {}, &block) end end ActiveRecord::Base.configurations = {'test' => {'adapter' => "sqlite3", 'database' => ":memory:"}} ActiveRecord::Base.establish_connection('test') ActiveRecord::Base.connection.instance_eval do eval File.read("#{ROOT}/test/schema/schema.rb") end Dir["#{ROOT}/test/models/*.rb"].each{|path| require path}
Version data entries
8 entries across 8 versions & 2 rubygems