Sha256: 1af9e85c9748dc676607fa6c594fb8de01514fd0e7f33dcdcf05515fdb4188e4

Contents?: true

Size: 420 Bytes

Versions: 58

Compression:

Stored size: 420 Bytes

Contents

class Test::Unit::TestCase
  def run_with_test_timing(*args, &block)    
    begin_time = Time.now
    run_without_test_timing(*args, &block)
    end_time = Time.now
 
    duration = end_time - begin_time
    threshold = 1.0
    
    if duration > threshold
      puts "\nSLOW TEST: #{duration} - #{self.name}"
    end
  end
  
  alias_method_chain :run, :test_timing unless method_defined?(:run_without_test_timing)
end

Version data entries

58 entries across 58 versions & 8 rubygems

Version Path
drogus-mongo_mapper-0.6.10 test/support/timing.rb
mongo_mapper-rails3-0.7.0.1 test/support/timing.rb
mongo_mapper-unstable-2010.2.27 test/support/timing.rb
mongo_mapper-unstable-2010.2.26 test/support/timing.rb
mongo_mapper-unstable-2010.2.25 test/support/timing.rb
mongo_mapper-unstable-2010.2.24 test/support/timing.rb
mongo_mapper-unstable-2010.2.23 test/support/timing.rb
mongo_mapper-unstable-2010.2.22 test/support/timing.rb
mongo_mapper-unstable-2010.2.19 test/support/timing.rb
mongo_mapper-unstable-2010.2.18 test/support/timing.rb
mongo_mapper-unstable-2010.2.17 test/support/timing.rb
mongo_mapper-unstable-2010.2.16 test/support/timing.rb
mongo_mapper-unstable-2010.2.15 test/support/timing.rb
mongo_mapper-unstable-2010.2.12 test/support/timing.rb
mongo_mapper-unstable-2010.2.11 test/support/timing.rb
mongo_mapper-unstable-2010.2.10 test/support/timing.rb
mongo_mapper-0.7.0 test/support/timing.rb
mongo_mapper-unstable-2010.2.9 test/support/timing.rb
mongo_mapper-unstable-2010.2.8 test/support/timing.rb
mongo_mapper-unstable-2010.2.5 test/support/timing.rb