Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rodrigodealer/802037 to your computer and use it in GitHub Desktop.
Save rodrigodealer/802037 to your computer and use it in GitHub Desktop.
# carrega no env.rb
seed_file = File.join(Rails.root, "db", "seeds.rb")
load(seed_file)
# no final, limpa a base de teste
at_exit do
require 'database_cleaner'
require 'database_cleaner/cucumber'
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment