Permalink
Browse files

add missing DatabaseCleaner configuration for RSpec

  • Loading branch information...
DanielKehoe committed Oct 7, 2012
1 parent 3952918 commit 91326b40725cb0fbd836252cd4b0654c699b52f6
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/spec_helper.rb
View
@@ -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.