Skip to content

Commit b27a880

Browse files
committed
Fix simplecov
1 parent 5467a7a commit b27a880

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/specs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
- name: Run all tests
7777
env:
7878
COVERAGE: "true"
79-
run: bundle exec rake
79+
run: bundle exec rspec
8080
- name: Send coverage results
8181
env:
8282
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}

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)