Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sc-35229: simplecov and json output
  • Loading branch information
tmaptible committed Dec 15, 2025
commit 5d59fa119e035921b216bb201b9a05299830771f
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ test/version_tmp
tmp
/.idea
/.vscode
coverage/
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ gem 'activesupport', '~> 4.0'
gem 'rack', '~> 1.0'

group :test do
gem 'simplecov'
gem 'simplecov_json_formatter'
gem 'webmock'
end

Expand Down
15 changes: 15 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@

Bundler.require :development

require 'simplecov'
require 'simplecov_json_formatter'

# Configure SimpleCov for both HTML and JSON output
SimpleCov.start do
add_filter '/spec/'
add_filter '/vendor/'

# Generate both HTML (for human viewing) and JSON (for CI/tooling)
formatter SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::JSONFormatter
])
end

# Load shared spec files
Dir["#{File.dirname(__FILE__)}/shared/**/*.rb"].each do |file|
require file
Expand Down