Commit 0faf80aa9d2a32d872a21f125862d46157013082

Authored by Jeroen van Baarsen
1 parent 8ec42ff8

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 RSpec.configure do |config| 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 DatabaseCleaner.strategy = :transaction 4 DatabaseCleaner.strategy = :transaction
  5 + DatabaseCleaner.clean_with(:truncation)
  6 + DatabaseCleaner.cleaning do
  7 + example.run
  8 + end
8 end 9 end
9 10
10 - config.around(:each, js: true) do 11 + config.around(:each, js: true) do |example|
11 DatabaseCleaner.strategy = :truncation 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 end 17 end
21 end 18 end