a spec test for mongoid bug: https://github.com/mongoid/mongoid/issues/2735