Sha256: 8c52f80b6d794070379521a48bb8887a559fdcfaa951e96f27faa1045f3d7a46

Contents?: true

Size: 676 Bytes

Versions: 1

Compression:

Stored size: 676 Bytes

Contents

# frozen_string_literal: true

# Starts SimpleCov for code coverage.

if ENV["COVERAGE"] == "true"
  require "simplecov"

  # Using a command name prevents results from getting clobbered by other test suites
  example_name = File.basename(File.expand_path("../..", __dir__))
  SimpleCov.command_name(example_name)

  SimpleCov.start("rails") do
    # Consider the entire gem project as the root
    # (typically this will be the folder named "react_on_rails")
    gem_root_path = File.expand_path("../../../..", __dir__)
    root gem_root_path

    # Don't report anything that has "spec" in the path
    add_filter do |src|
      src.filename =~ %r{/spec/}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
react_on_rails-12.0.4 lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb