Created
June 10, 2015 21:42
-
-
Save mycargus/b248e5d13b0284da2128 to your computer and use it in GitHub Desktop.
Cleans database after rspec execution. Store in spec_helper.rb From http://stackoverflow.com/questions/5916126/how-do-i-prepare-test-databases-for-rails-rspec-tests-without-running-rake-spe/18039499#18039499
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config.after :all do | |
| ActiveRecord::Base.subclasses.each(&:delete_all) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment