diff --git a/spec/support/adapters/mongo_mapper/connection.rb b/spec/support/adapters/mongo_mapper/connection.rb index 2f817b2..f83289c 100644 --- a/spec/support/adapters/mongo_mapper/connection.rb +++ b/spec/support/adapters/mongo_mapper/connection.rb @@ -1,3 +1,12 @@ +# We need to require "active_support" first here because MongoMapper requires +# "active_support/core_ext" without first requiring "active_support". On some +# systems, this causes intermittent test suite failures. +# +# See: https://github.com/rails/rails/issues/14664 +# and: https://github.com/mongomapper/mongomapper/commit/64f9fc6 +# +require "active_support" + require "mongo_mapper" MongoMapper.connection = Mongo::Connection.new