Skip to content

Instantly share code, notes, and snippets.

@jakeonrails
Created November 10, 2011 00:21
Embed
What would you like to do?
Logs the current example before and after it runs
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