top_tests 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/top_tests/version.rb +1 -1
- data/lib/top_tests.rb +2 -2
- metadata +1 -1
data/lib/top_tests/version.rb
CHANGED
data/lib/top_tests.rb
CHANGED
@@ -48,7 +48,7 @@ module TopTests
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def slow_tests
|
51
|
-
max_duration ? top_tests.find_all { |t|
|
51
|
+
max_duration ? top_tests.find_all { |t| t.last > max_duration } : []
|
52
52
|
end
|
53
53
|
|
54
54
|
def format_tests(tests)
|
@@ -64,7 +64,7 @@ module TopTests
|
|
64
64
|
def check_tests_duration
|
65
65
|
if !slow_tests.empty?
|
66
66
|
puts "\nTEST?FAIL! #{slow_tests.count} test(s) are taking longer than #{max_duration} seconds:"
|
67
|
-
puts format_tests(
|
67
|
+
puts format_tests(slow_tests)
|
68
68
|
puts
|
69
69
|
exit 1
|
70
70
|
end
|