$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'mongoid' require 'mongoid_paperclip' require 'mongoid_paperclip_image_dimension' require 'database_cleaner' RSpec.configure do |config| config.before(:suite) do DatabaseCleaner.strategy = :truncation end config.after(:each) do DatabaseCleaner.clean end end Mongoid.configure do |config| config.master = Mongo::Connection.new.db("mongoid_paperclip_image_dimension_test") end