Skip to content

Instantly share code, notes, and snippets.

@jakeonrails
Created November 10, 2011 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakeonrails/1353659 to your computer and use it in GitHub Desktop.
Save jakeonrails/1353659 to your computer and use it in GitHub Desktop.
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