summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2014-06-06 08:25:02 +0200
committerJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2014-06-06 08:25:02 +0200
commit0faf80aa9d2a32d872a21f125862d46157013082 (patch)
treef6a3ebecb9a028fd0003db9d26ca457a9ecaefa6 /spec
parent8ec42ff85ced58f925a1214738c841372f774eda (diff)
downloadgitlab-ce-0faf80aa9d2a32d872a21f125862d46157013082.tar.gz
Temp fix for rspec so the specs are run again
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/support/db_cleaner.rb23
1 files changed, 10 insertions, 13 deletions
diff --git a/spec/support/db_cleaner.rb b/spec/support/db_cleaner.rb
index f2b310245bd..fa466ef5aea 100644
--- a/spec/support/db_cleaner.rb
+++ b/spec/support/db_cleaner.rb
@@ -1,21 +1,18 @@
RSpec.configure do |config|
- config.around(:each) do
- DatabaseCleaner.clean_with(:truncation)
- end
- config.around(:each) do
+ config.around(:each) do |example|
DatabaseCleaner.strategy = :transaction
+ DatabaseCleaner.clean_with(:truncation)
+ DatabaseCleaner.cleaning do
+ example.run
+ end
end
- config.around(:each, js: true) do
+ config.around(:each, js: true) do |example|
DatabaseCleaner.strategy = :truncation
- end
-
- config.before(:each) do
- DatabaseCleaner.start
- end
-
- config.after(:each) do
- DatabaseCleaner.clean
+ DatabaseCleaner.clean_with(:truncation)
+ DatabaseCleaner.cleaning do
+ example.run
+ end
end
end