Skip to content
Browse files

add missing DatabaseCleaner configuration for RSpec

  • Loading branch information...
1 parent 3952918 commit 91326b40725cb0fbd836252cd4b0654c699b52f6 @DanielKehoe DanielKehoe committed Oct 6, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/spec_helper.rb
View
10 spec/spec_helper.rb
@@ -38,4 +38,14 @@
# the seed, which is printed after each run.
# --seed 1234
config.order = "random"
+
+ config.before(:suite) do
+ DatabaseCleaner.strategy = :truncation
+ end
+ config.before(:each) do
+ DatabaseCleaner.start
+ end
+ config.after(:each) do
+ DatabaseCleaner.clean
+ end
end

0 comments on commit 91326b4

Please sign in to comment.
Something went wrong with that request. Please try again.