Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit bb03abb

Browse files
committed
Modify DatabaseCleaner configuration
1 parent 297cd63 commit bb03abb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/support/adapters/mongoid/database_cleaner.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55
DatabaseCleaner["mongoid"].strategy = :truncation
66

77
RSpec.configure do |config|
8+
config.before(:suite) do
9+
DatabaseCleaner.clean_with(:truncation)
10+
end
11+
812
config.before do
13+
DatabaseCleaner.start
14+
end
15+
16+
config.after do
917
DatabaseCleaner.clean
1018
end
1119
end

0 commit comments

Comments
 (0)