Skip to content

Instantly share code, notes, and snippets.

@apolzon
Created March 1, 2012 21:04
Show Gist options
  • Select an option

  • Save apolzon/1953217 to your computer and use it in GitHub Desktop.

Select an option

Save apolzon/1953217 to your computer and use it in GitHub Desktop.
Rspec how long does each example take
if ENV['PROFILE_LIKE_CRAZY']
config.before :each do
$start = Time.now
end
config.after :each do
p "#{example.description} spec ran in #{"%.2f" % (Time.now - $start)} seconds"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment