Skip to content

Commit 3495eaa

Browse files
committed
make short_filename public to not test a private method
1 parent 5fbfae3 commit 3495eaa

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/code_climate/test_reporter/formatter.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ def format(result)
3636
false
3737
end
3838

39+
# actually private ...
40+
def short_filename(filename)
41+
return filename unless ::SimpleCov.root
42+
filename = filename.gsub(::SimpleCov.root, '.').gsub(/^\.\//, '')
43+
apply_prefix filename
44+
end
45+
3946
private
4047

4148
def partial?
@@ -83,12 +90,6 @@ def to_payload(result)
8390
}
8491
end
8592

86-
def short_filename(filename)
87-
return filename unless ::SimpleCov.root
88-
filename = filename.gsub(::SimpleCov.root, '.').gsub(/^\.\//, '')
89-
apply_prefix filename
90-
end
91-
9293
def tddium?
9394
ci_service_data && ci_service_data[:name] == "tddium"
9495
end

0 commit comments

Comments
 (0)