$LOAD_PATH << '../lib' require 'active_record' require 'mongoid' require 'html_format' Mongo::Logger.logger.level = Logger::INFO Mongoid::Config.connect_to('test') Mongoid::Clients.default.database.drop class User include Mongoid::Document field :name, type: String end ['alice', 'bob', 'carol'].each { |e| User.create!(name: e) } html_format User # => html_format User.first # => html_format User.limit(1) # => User.to_html # => User.first.to_html # => User.limit(1).to_html # => # ~> :148:in `require': cannot load such file -- mongoid (LoadError) # ~> from :148:in `require' # ~> from -:3:in `
'