Mongoid requires MRI version 1.9.3+ or JRuby 1.6.0+ running in 1.9 mode. Please see: http://mongoid.org/en/mongoid/docs/tips.html#ruby for details.
All specs still pass.
See https://github.com/mongoid/mongoid/blob/master/CHANGELOG.md and mongoid/mongoid#1989, the three methods .count, .size and .length have been rewritten to follow ActiveRecord behavior, which means .size and .lenght are now cached in an instance variable whereas .count always hits the database, hence the failing test.
…pe Integer but BSON::ObjectId
…ot exist anymore in mongoid 3