Run DatabaseCleaner before RSpec tests (#539)

* Rename workflow

* Run DatabaseCleaner before RSpec tests

* Run on all pushes
This commit is contained in:
Helge Rausch
2022-07-25 11:02:32 +02:00
committed by GitHub
parent 41e40561ce
commit 58cd495859
2 changed files with 7 additions and 4 deletions

View File

@@ -8,13 +8,12 @@
name: Ruby
on:
push:
branches: [ master ]
push: {}
pull_request:
branches: [ master ]
branches: [master]
jobs:
test:
tests:
runs-on: ubuntu-latest
services:
postgres:

View File

@@ -53,6 +53,10 @@ RSpec.configure do |config|
config.infer_spec_type_from_file_location!
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation, except: %w(achievements))
end
config.before(:example) do
DatabaseCleaner.strategy = :transaction
end