mirror of
https://github.com/chenasraf/snpr.git
synced 2026-05-17 17:38:07 +00:00
Run DatabaseCleaner before RSpec tests (#539)
* Rename workflow * Run DatabaseCleaner before RSpec tests * Run on all pushes
This commit is contained in:
@@ -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:
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user