I started an issue on this w/ some additional notes and a potential patch http://dev.rubyonrails.org/ticket/8218
On Apr 28, 11:34 am, Jake Brownson <[EMAIL PROTECTED]> wrote: > I'm trying to do a patch for Ticket #5369 (http://dev.rubyonrails.org/ > ticket/5369). > > I am working with the 1-2-stable branch. I am trying to add a test > that adds validates_associated to the Reply model and goes for a false > valid?. I discovered that it would only fail properly if I prepended > 000 to the name so it would run early in the list of tests. I tracked > down the problem to several tests adding various validations to the > models. These validations are persistant across tests. > > Here's what the validations of the Reply model look like during my > test if I run my test at the begininning of the suite: > (rdb:1) pp validations > [#<Proc:[EMAIL PROTECTED]/../lib/active_record/validations.rb:296>, > :errors_on_empty_content, > :validate_associated_records_for_replies] > > And here's what they look like if I break in the same test with only > the name modified so it runs in the middle of the pack. > (rdb:1) pp validations > [#<Proc:[EMAIL PROTECTED]/../lib/active_record/validations.rb:296>, > #<Proc:[EMAIL PROTECTED]/../lib/active_record/validations.rb:407>, > #<Proc:[EMAIL PROTECTED]/../lib/active_record/validations.rb:296>, > #<Proc:[EMAIL PROTECTED]/../lib/active_record/validations.rb:296>, > :errors_on_empty_content, > :validate_associated_records_for_replies] > > As you can see it has gathered a couple more validations from tests > running in the first half of the suite. > > I'm concerned some of the tests might be incorrectly passing as my > test does when I place it in the middle of the pack. > > Should the models be reset during the setup phase? Should I make a new > model for my purposes and leave the topic/reply models alone? > > Thanks, > > Jake --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
