Unit test problem -- BetterNestedSet?

After adding

validates_uniqueness_of :login_name

to a User model that acts_as_nested_set using BetterNestedSet, my unit
tests started failing.

On investigation, I found that valid? wasn’t true for the records in
question after they were created.

Running the exact same sequence of tests by hand in the console –
creating records, then calling move_to_child_of on them – works fine.
If I comment out the validation, the tests run fine.

Does anybody know what’s happening here?

Thanks!

–Al Evans