spec/support/mongoid.rb in mongoid-history-0.2.4 vs spec/support/mongoid.rb in mongoid-history-0.3.0
- old
+ new
@@ -1,11 +1,17 @@
-Mongoid.configure do |config|
- config.master = Mongo::Connection.new.db("mongoid-history")
-end
+ENV["MONGOID_ENV"] = "test"
+Mongoid.load!("config/mongoid.yml")
RSpec.configure do |config|
config.before :each do
Mongoid.observers = Mongoid::History::Sweeper
end
+ config.backtrace_clean_patterns = [
+ # /\/lib\d*\/ruby\//,
+ # /bin\//,
+ # /gems/,
+ # /spec\/spec_helper\.rb/,
+ /lib\/rspec\/(core|expectations|matchers|mocks)/
+ ]
end