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 <jbrown...@gmail.com>
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:0xb78d3e68@./../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:0xb78c9e68@./../lib/active_record/validations.rb:296>,
> #<Proc:0xb78bda14@./../lib/active_record/validations.rb:407>,
> #<Proc:0xb78c9e68@./../lib/active_record/validations.rb:296>,
> #<Proc:0xb78c9e68@./../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 rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---