command_line_reporter 3.3.4 → 3.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/command_line_reporter.rb +8 -3
- data/lib/command_line_reporter/version.rb +1 -1
- data/spec/command_line_reporter_spec.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1877affdc74574aea0c9487387ea065c2ba8225c
|
4
|
+
data.tar.gz: c32d8b9a32790311dea263dfe536a68826e12d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47cec4a1c2cc21884827bf9901d78fca75dba91115c2ba3b578afda1e1498bfeae64bd90a4914d218c07f21ebb6d3f50daef2b540bcc25207712e0750c48a884
|
7
|
+
data.tar.gz: 69eec23f5a033e70bcd4030640e493ca18a6c421a0704e5d92a57ccbc09617aab4fde81b6a6d1d1262aedb81e966c034240e2c2cbcf1d4115b3c603f2de7c450
|
@@ -75,9 +75,14 @@ module CommandLineReporter
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def vertical_spacing(lines = 1)
|
78
|
-
|
79
|
-
|
80
|
-
|
78
|
+
lines = Integer(lines)
|
79
|
+
|
80
|
+
# because puts "\n" * 0 produces an unwanted newline
|
81
|
+
if lines == 0
|
82
|
+
print "\0"
|
83
|
+
else
|
84
|
+
puts "\n" * lines
|
85
|
+
end
|
81
86
|
end
|
82
87
|
|
83
88
|
def datetime(options = {})
|
@@ -328,7 +328,9 @@ describe CommandLineReporter do
|
|
328
328
|
end
|
329
329
|
|
330
330
|
it 'prints carriage returns for the number of lines' do
|
331
|
-
expect(subject).to receive(:
|
331
|
+
expect(subject).to receive(:print).with("\0").and_return(nil)
|
332
|
+
expect(subject).to receive(:puts).with("\n" * 3).and_return("\n\n\n")
|
333
|
+
subject.vertical_spacing(0)
|
332
334
|
subject.vertical_spacing(3)
|
333
335
|
end
|
334
336
|
end
|