i'm unit testing computed properties on a DS.Model .
// a trivial example that i'm not actually testing
App.ModelA = DS.Model.extend({
sub_models : DS.hasMany('App.ModelB'),
lengthOfBees : function() {
return this.sub_models.length;
}.property('sub_models.length')
})
how do i manually create a record that has an association? providing json for a record with no associations is easy.. App.ModelX = App.ModelX.createRecord({ attribA : 'valueA'});
but i don't know the syntax for createRecord when i want to supply the hasMany associations. how do i do that?