dotpretty 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dotpretty/reporters/basic.rb +12 -1
- data/lib/dotpretty/reporters/progress.rb +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb44866622c88b9a0722ecfd42457185899d29c172a85022513da49842388ae3
|
4
|
+
data.tar.gz: 1109d0382e8d234177c9f7f94995347d15f01e2ee96609a7924e8a6258e350ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35502d2ff40f31df22c7084b460e93c19d4cb6ac7cc49e2d7c7fe2023e78664c7630976b2f3909afce7c2b8b8b9e9121be073366f01437d5f4bd4145bed9221d
|
7
|
+
data.tar.gz: 5329a2a735a9c600cd038606a113371827d26aaf8bd73f11bc0d4359ee614b585f9478811fbd308ad562c59ed126dfcb5907c189bb296cadd1b4d8707ae63631
|
@@ -39,11 +39,22 @@ module Dotpretty
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def show_test_summary(summary)
|
42
|
-
|
42
|
+
message = colored_message(summary)
|
43
|
+
output.puts("")
|
44
|
+
output.puts("#{message}")
|
43
45
|
end
|
44
46
|
|
45
47
|
private
|
46
48
|
|
49
|
+
def colored_message(summary)
|
50
|
+
message = "Total tests: #{summary[:totalTests]}. Passed: #{summary[:passedTests]}. Failed: #{summary[:failedTests]}. Skipped: #{summary[:skippedTests]}."
|
51
|
+
if summary[:passedTests] == summary[:totalTests]
|
52
|
+
return green(message)
|
53
|
+
else
|
54
|
+
return red(message)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
47
58
|
attr_accessor :output
|
48
59
|
|
49
60
|
end
|
@@ -28,7 +28,7 @@ module Dotpretty
|
|
28
28
|
output.puts("")
|
29
29
|
output.puts("")
|
30
30
|
show_failure_summary if !failing_tests.empty?
|
31
|
-
output.puts(
|
31
|
+
output.puts(formatted_test_summary(summary))
|
32
32
|
end
|
33
33
|
|
34
34
|
def starting_tests
|
@@ -46,6 +46,15 @@ module Dotpretty
|
|
46
46
|
|
47
47
|
private
|
48
48
|
|
49
|
+
def formatted_test_summary(summary)
|
50
|
+
message = "Total tests: #{summary[:totalTests]}. Passed: #{summary[:passedTests]}. Failed: #{summary[:failedTests]}. Skipped: #{summary[:skippedTests]}."
|
51
|
+
if summary[:totalTests] == summary[:passedTests]
|
52
|
+
return green(message)
|
53
|
+
else
|
54
|
+
return red(message)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
49
58
|
def show_failure_summary
|
50
59
|
output.puts("Failures:")
|
51
60
|
output.puts("")
|
@@ -59,7 +68,6 @@ module Dotpretty
|
|
59
68
|
end
|
60
69
|
output.puts("")
|
61
70
|
end
|
62
|
-
|
63
71
|
attr_accessor :failing_tests, :output
|
64
72
|
|
65
73
|
end
|