Skip to content

Commit

Permalink
Rails 4 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisbernard committed Mar 16, 2013
1 parent a9762dd commit 8cef470
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/top_tests.rb
Expand Up @@ -16,10 +16,12 @@ def self.included(klass)
########################

def before_setup
super
@timer_started_at = Time.now
end

def after_teardown
super
if @timer_started_at # Unset when a setup hook fails before top test.
name = self.class.to_s + '#' + @__name__
self.class.tests_durations << [name, Time.now - @timer_started_at]
Expand Down

0 comments on commit 8cef470

Please sign in to comment.