ActiveRecord tests for patch

Josh Susser
Sun, 14 Jan 2007 19:31:12 -0000

Hey folks,

I''ve got a patch that fixes the problem with erroneous
singularization of foreign keys with eager loading (#4117, #6390),
and all the AR tests pass.  However, I don''t yet have a failing test
case that can be submitted as a patch (though I can easily reproduce
it in an app).  Adding a table to the schema seems to require
modifying ten different .sql files for all the various supported
databases, and I''m not familiar with many of those DDL variants and
don''t have any way to test that I put the files together correctly
since all I run is MySQL.  What''s a good way to proceed?

Also, The amount of test code I''m going to have to create for this
issue is relatively large - five classes, six tables, and at least
five test cases.  Is that overkill?  Is complete coverage on negative
tests required here?  This situation is particularly gross because it
requires using names which have singular forms that can be
singularized, but there are very few that give semantically friendly
examples and aren''t already used in the tests.  I could use nonsense
names, though that seems aesthetically unpleasing.  Or, if someone
could advise me how to use custom inflections in AR tests I could go
that way.

--
Josh Susser
http://blog.hasmanythrough.com



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---