File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 22
33* Colorizes text output.
44* Supports scss/sass files.
5+ * Fixes newline output bug when there are no redundancies
56
67## 0.1.0 ##
78
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ def execute
4545 if @json
4646 puts JSONReporter . new ( combined_redundancies ) . report
4747 else
48- puts Reporter . new ( combined_redundancies ) . report ( verbose :@verbose , color :true )
48+ report = Reporter . new ( combined_redundancies ) . report ( verbose :@verbose , color :true )
49+ puts report unless report . empty?
4950 end
5051
5152 rescue Parslet ::ParseFailed => e
Original file line number Diff line number Diff line change @@ -29,5 +29,10 @@ module Csscss
2929EXPECTED
3030 reporter . report ( verbose :true , color :false ) . must_equal expected
3131 end
32+
33+ it "prints a new line if there is nothing" do
34+ reporter = Reporter . new ( { } )
35+ reporter . report ( ) . must_equal ""
36+ end
3237 end
3338end
You can’t perform that action at this time.
0 commit comments