Skip to content

Commit 0ecc5c7

Browse files
committed
Fix simplecov
1 parent 5467a7a commit 0ecc5c7

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

spec/spec_helper.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
if ENV["COVERAGE"] == "true"
66
require "simplecov"
77
require "simplecov_json_formatter"
8+
SimpleCov.start do
9+
command_name "Job #{ENV["GITHUB_RUN_NUMBER"]}" if ENV["GITHUB_RUN_NUMBER"]
810

9-
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
10-
SimpleCov::Formatter::HTMLFormatter,
11-
SimpleCov::Formatter::JSONFormatter
12-
])
11+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
12+
SimpleCov::Formatter::HTMLFormatter,
13+
SimpleCov::Formatter::JSONFormatter
14+
])
1315

14-
SimpleCov.start do
15-
add_filter %r{^/spec/}
16+
add_filter "/spec/"
17+
track_files "/lib/*.rb"
1618
end
1719
end
1820

spec/teckel_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
RSpec.describe Teckel do
44
it "has a version number" do
5+
expect(Teckel.const_defined?(:VERSION)).to be true
56
expect(Teckel::VERSION).not_to be nil
67
end
78
end

0 commit comments

Comments
 (0)