Commit 0faf80aa9d2a32d872a21f125862d46157013082
1 parent
8ec42ff8
Exists in
spb-stable
and in
2 other branches
Temp fix for rspec so the specs are run again
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Showing
1 changed file
with
10 additions
and
13 deletions
Show diff stats
spec/support/db_cleaner.rb
1 | 1 | RSpec.configure do |config| |
2 | - config.around(:each) do | |
3 | - DatabaseCleaner.clean_with(:truncation) | |
4 | - end | |
5 | 2 | |
6 | - config.around(:each) do | |
3 | + config.around(:each) do |example| | |
7 | 4 | DatabaseCleaner.strategy = :transaction |
5 | + DatabaseCleaner.clean_with(:truncation) | |
6 | + DatabaseCleaner.cleaning do | |
7 | + example.run | |
8 | + end | |
8 | 9 | end |
9 | 10 | |
10 | - config.around(:each, js: true) do | |
11 | + config.around(:each, js: true) do |example| | |
11 | 12 | DatabaseCleaner.strategy = :truncation |
12 | - end | |
13 | - | |
14 | - config.before(:each) do | |
15 | - DatabaseCleaner.start | |
16 | - end | |
17 | - | |
18 | - config.after(:each) do | |
19 | - DatabaseCleaner.clean | |
13 | + DatabaseCleaner.clean_with(:truncation) | |
14 | + DatabaseCleaner.cleaning do | |
15 | + example.run | |
16 | + end | |
20 | 17 | end |
21 | 18 | end | ... | ... |