mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Do not clean DB twice on feature specs
It turns out that we were executing `DatabaseCleaner.clean` on two `after(:each)` blocks. One for all specs and another one for `js: true` specs. As a result feature specs were hitting both which slows them down considerably. On my machine this changes consistently saves 2sec on `spec/features/consumer/shops_spec.rb` but chances are it has an accumulative effect when run on the whole test suite.
This commit is contained in:
@@ -91,7 +91,6 @@ RSpec.configure do |config|
|
||||
config.after(:each, js:true) do
|
||||
Capybara.reset_sessions!
|
||||
RackRequestBlocker.wait_for_requests_complete
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
def restart_phantomjs
|
||||
|
||||
Reference in New Issue
Block a user