mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Move factory linting to CI cycle
No need to do this before each and every spec or example. Speeds up suite and make things less fragile.
This commit is contained in:
parent
0104671e01
commit
7dbe2d19fe
5 changed files with 5 additions and 32 deletions
|
|
@ -1,20 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'external_request'
|
||||
|
||||
RSpec.configure do |config|
|
||||
|
||||
config.before(:suite) do
|
||||
if ENV['OSEM_FACTORY_LINT'] != 'false'
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
begin
|
||||
DatabaseCleaner.start
|
||||
mock_commercial_request
|
||||
FactoryBot.lint
|
||||
ensure
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue