diff options
| author | Teddy Wing | 2017-12-13 17:01:15 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-13 17:01:15 +0100 |
| commit | bd8a999b12963b7303500ce93449bb7932afeec3 (patch) | |
| tree | 66e2c140ad1c80f49a95f9c8957fb71810e3b7ba /spec/support/referential.rb | |
| parent | 985d9a673a79f2b304119999dc76d418225332c7 (diff) | |
| download | chouette-core-bd8a999b12963b7303500ce93449bb7932afeec3.tar.bz2 | |
referential_lock_during_creation_spec: Make truncation strategy stick
The `truncation: true` strategy wasn't sticking. The config `before`
block only ran once for this test file. Instead of attaching the filter
to the `it` blocks, put it on the `context`. This correctly gets each
test to run in a transaction.
Remove the `truncation: false` filter I had added previously as this
didn't do what I wanted it to: it prevented the `before` block from
running instead of filtering out tests with `truncation: true`.
Refs #5024
Diffstat (limited to 'spec/support/referential.rb')
| -rw-r--r-- | spec/support/referential.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/referential.rb b/spec/support/referential.rb index d00a9ba7f..3a41b2e70 100644 --- a/spec/support/referential.rb +++ b/spec/support/referential.rb @@ -72,7 +72,7 @@ RSpec.configure do |config| ) end - config.before(:each, truncation: false) do + config.before(:each) do DatabaseCleaner.strategy = :transaction # Switch into the default tenant first_referential.switch |
