When you re-order the children in before_save it alters the children set for the parent, but the in-RAM copy still has the old children with old order_value’s.  That was the only test that broke once I force the non-nil value for order_value for all records about to be saved.

David

On Jan 17, 2014, at 10:14 PM, Matthew McEachen <notifications@github.com> wrote:

> In spec/label_spec.rb:
> 
> > @@ -297,7 +330,7 @@ def children_name_and_order
> >        f2 = Label.find_or_create_by_path %w(a2 b2 c2 d2 e2 f2)
> >        f1.add_sibling(f2)
> >        f2.ancestry_path.should == %w(a1 b1 c1 d1 e1 f2)
> > -      f1.parent.children.should == [f1, f2]
> > +      f1.parent.reload.children.should == [f1, f2]
> Why should you have to reload the parent's children collection?
> 
> —
> Reply to this email directly or view it on GitHub.
>