Skip to content

Commit

Permalink
add missing DatabaseCleaner configuration for RSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKehoe committed Oct 7, 2012
1 parent 3952918 commit 91326b4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -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.