Last active
August 29, 2015 14:00
-
-
Save mattconnolly/73e614f068d8e1d440e3 to your computer and use it in GitHub Desktop.
spec_helper - clear the test log before each test run.
This file contains 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
# near the top of spec_helper.rb | |
# clear the test log file before we start. | |
log_file = Rails.root.join("log/test.log") | |
File.truncate(log_file, 0) if File.exist?(log_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually this seems to work better when put near the top of spec_helper than in a config.before(:suite) block.