Created
November 10, 2011 00:21
-
-
Save jakeonrails/1353659 to your computer and use it in GitHub Desktop.
Logs the current example before and after it runs
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
if Rails.application.config.log_test_names | |
RSpec.configure do |config| | |
config.before(:each) do |x| | |
Rails.logger.info('*' * 10 + 'Start Example: ' + x.example.metadata[:example_group][:full_description]) | |
end | |
config.after(:each) do |x| | |
Rails.logger.info('*' * 10 + 'Finish Example: ' + x.example.metadata[:example_group][:full_description]) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment