Sha256: bb40cc75f3478b7ea711699ecb16eb6faf49b429be8ec62566ad57ac27532bc6

Contents?: true

Size: 409 Bytes

Versions: 1

Compression:

Stored size: 409 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 = 5.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

1 entries across 1 versions & 1 rubygems

Version Path
pwnash-mongo_mapper-0.7.5 test/support/timing.rb