Refactoring: NO_RESET_BEFORE_SUITE is not practical for the general use case of running RSpec multiple times and slows down/decreases DX.

This commit is contained in:
Thorsten Eckel 2019-01-08 09:17:18 +01:00
parent a211d20db9
commit cfc1bdbb45
2 changed files with 1 additions and 3 deletions

View file

@ -366,14 +366,12 @@ browser:build:
<<: *test_capybara_definition
variables:
RAILS_ENV: "test"
NO_RESET_BEFORE_SUITE: "true"
BROWSER: "chrome"
.variables_capybara_ff_template: &variables_capybara_ff_definition
<<: *test_capybara_definition
variables:
RAILS_ENV: "test"
NO_RESET_BEFORE_SUITE: "true"
BROWSER: "firefox"
test:browser:core:capybara_chrome_postgresql:

View file

@ -1,6 +1,6 @@
RSpec.configure do |config|
config.before(:suite) do
next if ENV['NO_RESET_BEFORE_SUITE']
next if !ENV['RESET_BEFORE_SUITE']
Rake::Task['zammad:db:reset'].invoke
end