diff options
author | Murray Steele <muz@h-lame.com> | 2008-12-19 13:27:34 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-19 13:37:50 +0000 |
commit | 8a92cdc8638d1f91aaa55fc47743a6210ad2181b (patch) | |
tree | f406e518354ec716f6a268747faaf514c5daf341 /activerecord/test/cases/helper.rb | |
parent | c044c079ab14487b4410874be2169ab4aa9b8a23 (diff) | |
download | rails-8a92cdc8638d1f91aaa55fc47743a6210ad2181b.tar.gz rails-8a92cdc8638d1f91aaa55fc47743a6210ad2181b.tar.bz2 rails-8a92cdc8638d1f91aaa55fc47743a6210ad2181b.zip |
Add a repair_helper to repair changes to the validations inside validations_test.rb [#674 state:resolved]
Many of the tests in validations_test would add a new validation to
models. However, only Topic was being reset with a fairly aggressive
clearing of all validations. None of the other models being used however
were recieving the same treatment. Now we use repair_validations(Topic)
for the whole test case because most test cases use Topic and then the
block form of repair_validations(<other_models>) inside any tests that use
other models.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r-- | activerecord/test/cases/helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index afba715448..2043138ca3 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -9,6 +9,8 @@ require 'active_record/test_case' require 'active_record/fixtures' require 'connection' +require 'cases/repair_helper' + # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true @@ -60,6 +62,8 @@ end class ActiveSupport::TestCase include ActiveRecord::TestFixtures + include ActiveRecord::Testing::RepairHelper + self.fixture_path = FIXTURES_ROOT self.use_instantiated_fixtures = false self.use_transactional_fixtures = true |