Improves test speed
This commit is contained in:
parent
e3f5b48d26
commit
0496ed23e5
2 changed files with 20 additions and 4 deletions
|
|
@ -4,9 +4,15 @@ RSpec.configure do |config|
|
|||
|
||||
config.before(:suite) do
|
||||
if ENV['OSEM_FACTORY_LINT'] != 'false'
|
||||
mock_commercial_request
|
||||
FactoryGirl.lint
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
begin
|
||||
DatabaseCleaner.start
|
||||
mock_commercial_request
|
||||
FactoryGirl.lint
|
||||
ensure
|
||||
DatabaseCleaner.clean
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue