Skip to content

Instantly share code, notes, and snippets.

@matthuhiggins
Created June 12, 2012 22:37
Show Gist options
  • Save matthuhiggins/2920554 to your computer and use it in GitHub Desktop.
Save matthuhiggins/2920554 to your computer and use it in GitHub Desktop.
test time tracker
@@test_classes = {}
@@test_methods = {}
setup do
@start_time = Time.now
end
teardown do
delta = Time.now - @start_time
@@test_classes[self.class.name] ||= 0
@@test_classes[self.class.name] += delta
@@test_methods["#{self.class.name}##{method_name}"] = delta
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment