This project is archived and is in readonly mode.
validations_test.rb: tests make changes to models without reverting them
-
Pratik
- State changed from new to incomplete
Hey Murray,
I think you forgot to include the definition of repair_validations method.
-
Murray Steele
You're right, I'm an idiot. Attaching a new version. Although this version no longer includes the repair_default_error_messages stuff because I haven't looked into the new i18N stuff.
-
Pratik
- State changed from incomplete to open
-
Repository
- State changed from open to resolved
(from [8a92cdc8638d1f91aaa55fc47743a6210ad2181b]) Add a repair_helper to repair changes to the validations inside validations_test.rb [#674 validations_test.rb: tests make changes to models without reverting them 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 http://github.com/rails/rails/co...
