Ok, final update. All my tests are now passing! The trick was to make sure that ALL the down-chain fixtures get loaded. This applies to both belongs_to and has_many. The bake scripts did not fully populate the var $fixtures. I am not sure this is a bug because of the order of my baking the models and creating the db tables.
So I'd suggest creating all the DB tables before baking models. Then double check the fullest extent of fixtures get loaded in the tests. Overall, this seems to me to not be a necessary dependency. In RSpec/Rails you can be very fine grained about what fixtures you want to load. So you can load a single fixture for that model's table and ignore any belongs_to or has_many associations. Ed On Fri, Dec 12, 2008 at 2:48 PM, Ed Howland <[email protected]> wrote: > Ok, currently (nightly build 12/12/2008) I am seeing the following. > > First, I re-baked all models to get new fixtures and test cases. > > 1. Any leaf model w.o any associations works fine. > 2. Any leaf model that has a has_many association, doesn't seem to > create that table. > 3. Any model with a single depth belongs_to association works fine > 4. Any model that belongs_to a model that belongs_to another model > doesn't create the furthest model in the chain. > > I am not sure that final one is a consistent symptom. But I had a 4 > way indirect chain and it bombed on the final model that the > penultimate model belonged to. But it seemed to create all other > tables up to that point. > > Do your tests test models with deep associations? > > Also, I have 6 failures in the Core tests for model. > > All model tests > > * Failed > Equal expectation fails with member [comments] with member > [article_id] as key list [type, null, default] does not match key list > [type, null] at > [/var/www/xeon/cake/tests/cases/libs/model/schema.test.php line 391] > ModelGroupTest -> > /var/www/xeon/cake/tests/cases/libs/model/schema.test.php -> > CakeSchemaTest -> testSchemaRead > * Failed > Identical expectation [Array: 4 items] fails with [Array: 3 > items] as key list [type, null, default, length] does not match key > list [type, null, length] at > [/var/www/xeon/cake/tests/cases/libs/model/schema.test.php line 395] > ModelGroupTest -> > /var/www/xeon/cake/tests/cases/libs/model/schema.test.php -> > CakeSchemaTest -> testSchemaRead > * Failed > at > [/var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > line 110] > ModelGroupTest -> > /var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > -> ContainableTest -> testContainments > * Failed > at > [/var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > line 111] > ModelGroupTest -> > /var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > -> ContainableTest -> testContainments > * Failed > Equal expectation fails as key list [] does not match key list > [0, 1] at > [/var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > line 112] > ModelGroupTest -> > /var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > -> ContainableTest -> testContainments > * Failed > Equal expectation fails as key list [] does not match key list > [0] at > [/var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > line 113] > ModelGroupTest -> > /var/www/xeon/cake/tests/cases/libs/model/behaviors/containable.test.php > -> ContainableTest -> testContainments > > > Ed > > > -- > Ed Howland > http://greenprogrammer.blogspot.com > http://twitter.com/ed_howland > -- Ed Howland http://greenprogrammer.blogspot.com http://twitter.com/ed_howland --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
