mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Set up fixtures for AR tests
This commit is contained in:
@@ -6,6 +6,7 @@ require 'test/unit'
|
||||
|
||||
require 'active_record'
|
||||
require 'active_record/test_case'
|
||||
require 'active_record/fixtures'
|
||||
require 'connection'
|
||||
|
||||
# Show backtraces for deprecated behavior for quicker cleanup.
|
||||
@@ -55,3 +56,10 @@ unless ENV['FIXTURE_DEBUG']
|
||||
alias_method_chain :try_to_load_dependency, :silence
|
||||
end
|
||||
end
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
include ActiveRecord::TestFixtures
|
||||
self.fixture_path = FIXTURES_ROOT
|
||||
self.use_instantiated_fixtures = false
|
||||
self.use_transactional_fixtures = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user