Banco de dados RSpec truncado antes de todos os blocos
RSpec.configure do |config| config.before(:each) do if example.metadata[:database_cleaner] != :all DatabaseCleaner.start end end config.after(:each) do if example.metadata[:database_cleaner] != :all DatabaseCleaner.clean end end config.before(:all, database_cleaner: :all) do DatabaseCleaner.clean end config.after(:all, database_cleaner: :all) …
Continuar lendo