repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/encodings/spec/simple_spec.rb
test_projects/encodings/spec/simple_spec.rb
require_relative "spec_helper" describe Fun do it "call things" do expect(subject.🇯🇵).to eq "tada!" end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/encodings/spec/spec_helper.rb
test_projects/encodings/spec/spec_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start do track_files "lib/euc_jp_not_declared_tracked.rb" end require_relative "../lib/utf8.rb" require_relative "../lib/euc_jp.rb" require_relative "../lib/euc_jp_not_declared.rb"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/encodings/lib/utf8.rb
test_projects/encodings/lib/utf8.rb
# frozen_string_literal: true class Fun MSG = "おはよう" def 🇯🇵 "tada!" end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/encodings/lib/euc_jp_not_declared.rb
test_projects/encodings/lib/euc_jp_not_declared.rb
# frozen_string_literal: true class Fun3 # ruby actually breaks on the not decalred multibyte characters, # which is nice I guess MSG = "Something Else" def no_moji "tada!" end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/app/jobs/application_job.rb
test_projects/rails/rspec_rails/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationError end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/app/helpers/application_helper.rb
test_projects/rails/rspec_rails/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/app/controllers/application_controller.rb
test_projects/rails/rspec_rails/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/app/models/foo.rb
test_projects/rails/rspec_rails/app/models/foo.rb
class Foo def bar "bar" end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/app/models/application_record.rb
test_projects/rails/rspec_rails/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/spec/foo_spec.rb
test_projects/rails/rspec_rails/spec/foo_spec.rb
require "rails_helper" RSpec.describe Foo do describe "#bar" do it "bars" do expect(subject.bar).to eq "bar" end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/spec/rails_helper.rb
test_projects/rails/rspec_rails/spec/rails_helper.rb
# This file is copied to spec/ when you run 'rails generate rspec:install' require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../config/environment', __dir__) # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails....
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/spec/spec_helper.rb
test_projects/rails/rspec_rails/spec/spec_helper.rb
require "simplecov" SimpleCov.start "rails"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/application.rb
test_projects/rails/rspec_rails/config/application.rb
require_relative "boot" require "logger" require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" # require "active_storage/engine" require "action_controller/railtie" # require "action_mailer/railtie" # require "action_mailbox/engine" ...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/environment.rb
test_projects/rails/rspec_rails/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/puma.rb
test_projects/rails/rspec_rails/config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/routes.rb
test_projects/rails/rspec_rails/config/routes.rb
Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/spring.rb
test_projects/rails/rspec_rails/config/spring.rb
Spring.watch( ".ruby-version", ".rbenv-vars", "tmp/restart.txt", "tmp/caching-dev.txt" )
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/boot.rb
test_projects/rails/rspec_rails/config/boot.rb
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile.
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/initializers/filter_parameter_logging.rb
test_projects/rails/rspec_rails/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ]
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/initializers/wrap_parameters.rb
test_projects/rails/rspec_rails/config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters f...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/initializers/cookies_serializer.rb
test_projects/rails/rspec_rails/config/initializers/cookies_serializer.rb
# Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/environments/test.rb
test_projects/rails/rspec_rails/config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data the...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/rails/rspec_rails/config/environments/development.rb
test_projects/rails/rspec_rails/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/subprocesses/.simplecov_spawn.rb
test_projects/subprocesses/.simplecov_spawn.rb
require 'bundler/setup' require 'simplecov' SimpleCov.command_name 'spawn' SimpleCov.at_fork.call(Process.pid) SimpleCov.start
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/subprocesses/spec/spawn_spec.rb
test_projects/subprocesses/spec/spawn_spec.rb
require 'spec_helper' require 'open3' describe 'spawn' do it 'calls things' do Dir.chdir(File.expand_path('..', __dir__)) do stdout, exitstatus = Open3.capture2("ruby -r./.simplecov_spawn lib/command") expect(stdout.chomp).to eq 'done' end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/subprocesses/spec/simple_spec.rb
test_projects/subprocesses/spec/simple_spec.rb
require_relative "spec_helper" describe Subprocesses do it "call things" do expect(subject.run).to be true end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/subprocesses/spec/spec_helper.rb
test_projects/subprocesses/spec/spec_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start require_relative "../lib/subprocesses.rb"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/subprocesses/lib/subprocesses.rb
test_projects/subprocesses/lib/subprocesses.rb
class Subprocesses def run method_called_in_parent_process pid = Process.fork do method_called_by_subprocess end Process.wait(pid) true end def method_called_in_parent_process true end def method_called_by_subprocess true end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/minitest/some_test.rb
test_projects/faked_project/minitest/some_test.rb
# frozen_string_literal: true require "test_helper" require "faked_project/some_class" class SomeTest < Minitest::Test def setup @instance = SomeClass.new("foo") end def test_reverse assert_equal "oof", @instance.reverse end def test_comparison assert @instance.compare_with("foo") end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/minitest/test_helper.rb
test_projects/faked_project/minitest/test_helper.rb
# frozen_string_literal: true require "bundler/setup" # We're injecting simplecov_config via aruba in cucumber here # depending on what the test case is... begin require File.join(File.dirname(__FILE__), "simplecov_config") rescue LoadError warn "No SimpleCov config file found!" end require "minitest/autorun"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/minitest/other_test.rb
test_projects/faked_project/minitest/other_test.rb
# frozen_string_literal: true require "bundler/setup" begin require File.expand_path("simplecov_config", __dir__) rescue LoadError warn "No SimpleCov config file found!" end require "minitest/autorun" require "faked_project/some_class" class OtherTest < Minitest::Test def setup @instance = SomeClass.new("...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/test/test_helper.rb
test_projects/faked_project/test/test_helper.rb
# frozen_string_literal: true require "bundler/setup" # We're injecting simplecov_config via aruba in cucumber here # depending on what the test case is... begin require File.join(File.dirname(__FILE__), "simplecov_config") rescue LoadError warn "No SimpleCov config file found!" end require "faked_project" requi...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/test/faked_test.rb
test_projects/faked_project/test/faked_test.rb
# frozen_string_literal: true require_relative "test_helper" class FakedTest < Test::Unit::TestCase def test_something assert_equal "bar", FakedProject.foo end def test_framework_specific assert_equal "Only tested in Test/Unit", FrameworkSpecific.test_unit end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/test/meta_magic_test.rb
test_projects/faked_project/test/meta_magic_test.rb
# frozen_string_literal: true require_relative "test_helper" class MetaMagicTest < Test::Unit::TestCase def test_class_methods assert_equal "this is a mixed-in class method", FakedProject.a_class_method end def test_instance_methods p = FakedProject.new assert_equal "this is a mixed-in instance met...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/test/some_class_test.rb
test_projects/faked_project/test/some_class_test.rb
# frozen_string_literal: true require_relative "test_helper" class SomeClassTest < Test::Unit::TestCase def setup @instance = SomeClass.new("foo") end def test_reverse assert_equal "oof", @instance.reverse end def test_comparison assert @instance.compare_with("foo") end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/features/support/env.rb
test_projects/faked_project/features/support/env.rb
# frozen_string_literal: true require "bundler/setup" # We're injecting simplecov_config via aruba in cucumber here # depending on what the test case is... begin require File.join(File.dirname(__FILE__), "simplecov_config") rescue LoadError warn "No SimpleCov config file found!" end $LOAD_PATH.unshift(File.join(...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/features/step_definitions/my_steps.rb
test_projects/faked_project/features/step_definitions/my_steps.rb
# frozen_string_literal: true Given(/^I want to keep stuff simple$/) do expect(1).to eq(1) end When(/^I write my cukes for the fake project$/) do expect(1).to eq(1) end Then(/^I make all necessary tests in a single step$/) do expect(FakedProject.foo).to eq("bar") expect(FrameworkSpecific.cucumber).to eq("On...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/spec/meta_magic_spec.rb
test_projects/faked_project/spec/meta_magic_spec.rb
# frozen_string_literal: true require "spec_helper" describe FakedProject do it "should have added a class method to FakedProject" do expect(FakedProject.a_class_method).to eq("this is a mixed-in class method") end it "should have added a mixed-in instance method to FakedProject" do expect(subject.an_i...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/spec/some_class_spec.rb
test_projects/faked_project/spec/some_class_spec.rb
# frozen_string_literal: true require "spec_helper" describe SomeClass do subject { SomeClass.new("foo") } it "should be reversible" do expect(subject.reverse).to eq("oof") end it "should compare with 'foo'" do expect(subject.compare_with("foo")).to be true end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/spec/forking_spec.rb
test_projects/faked_project/spec/forking_spec.rb
# frozen_string_literal: true require "spec_helper" describe "forking" do it do # TODO: The defined?(RUBY_ENGINE) check can be dropped for simplecov 1.0.0 Process.waitpid(Kernel.fork {}) unless defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/spec/spec_helper.rb
test_projects/faked_project/spec/spec_helper.rb
# frozen_string_literal: true require "bundler/setup" # We're injecting simplecov_config via aruba in cucumber here # depending on what the test case is... begin require File.join(File.dirname(__FILE__), "simplecov_config") rescue LoadError warn "No SimpleCov config file found!" end require "faked_project"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/spec/faked_spec.rb
test_projects/faked_project/spec/faked_spec.rb
# frozen_string_literal: true require "spec_helper" describe FakedProject do it "should return proper foo" do expect(FakedProject.foo).to eq("bar") end it "should test it's framework specific method" do expect(FrameworkSpecific.rspec).to eq("Only tested in RSpec") end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/lib/faked_project.rb
test_projects/faked_project/lib/faked_project.rb
# frozen_string_literal: true class FakedProject def self.foo "bar" end end Dir[File.join(File.dirname(__FILE__), "faked_project/*.rb")].reject { |f| /untested/.match(f) }.each do |file| require file # Require all source files in project dynamically so we can inject some stuff depending on test situation en...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/lib/faked_project/untested_class.rb
test_projects/faked_project/lib/faked_project/untested_class.rb
# frozen_string_literal: true class UntestedClass def initialize(yogurts) @yogurts = yogurts end def power_level @yogurts.map do |yo| yo.experience_points**2 end.reduce(0, &:+) end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/lib/faked_project/some_class.rb
test_projects/faked_project/lib/faked_project/some_class.rb
# frozen_string_literal: true class SomeClass attr_reader :label attr_accessor :some_attr def initialize(label) @label = label end def reverse label.reverse end def compare_with(item) if item == label true else raise "Item does not match label" end rescue StandardErro...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/lib/faked_project/framework_specific.rb
test_projects/faked_project/lib/faked_project/framework_specific.rb
# frozen_string_literal: true # A pile of methods that only get tested in their frameworks # and thus make this file only 100% covered when all framework test # results are merged module FrameworkSpecific class << self def cucumber "Only tested in Cucumber" end def rspec "Only tested in RSpe...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/lib/faked_project/meta_magic.rb
test_projects/faked_project/lib/faked_project/meta_magic.rb
# frozen_string_literal: true module MetaMagic module ClassMethods def a_class_method "this is a mixed-in class method" end end module InstanceMethods def an_instance_method "this is a mixed-in instance method" end end def self.included(base) base.send :extend, ClassMethods ...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/bad_spec/failing_spec.rb
test_projects/faked_project/bad_spec/failing_spec.rb
require_relative "spec_helper" RSpec.describe "failing" do it "fails" do exoect(1).to eq 2 end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/bad_spec/fail_with_5.rb
test_projects/faked_project/bad_spec/fail_with_5.rb
require_relative "spec_helper" exit(5)
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/faked_project/bad_spec/spec_helper.rb
test_projects/faked_project/bad_spec/spec_helper.rb
# frozen_string_literal: true require "bundler/setup" require "simplecov" SimpleCov.start require "faked_project"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/old_coverage_json/spec/code_spec.rb
test_projects/old_coverage_json/spec/code_spec.rb
# frozen_string_literal: true require "spec_helper" RSpec.describe Code do it "#foo returns :foo being passed 42" do expect(subject.foo(42)).to eq :foo end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/old_coverage_json/spec/spec_helper.rb
test_projects/old_coverage_json/spec/spec_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start require_relative "../lib/code"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/old_coverage_json/lib/code.rb
test_projects/old_coverage_json/lib/code.rb
# frozen_string_literal: true class Code def foo(arg) if arg == 42 :foo else :bar end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/spec/spec_helper.rb
test_projects/pagination/spec/spec_helper.rb
# frozen_string_literal: true require "simplecov" SimpleCov.start Dir["lib/*.rb"].each {|file| require_relative "../#{file}" }
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/e.rb
test_projects/pagination/lib/e.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/c.rb
test_projects/pagination/lib/c.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/i.rb
test_projects/pagination/lib/i.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/k.rb
test_projects/pagination/lib/k.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/g.rb
test_projects/pagination/lib/g.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/d.rb
test_projects/pagination/lib/d.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/a.rb
test_projects/pagination/lib/a.rb
# nothing to see here
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/h.rb
test_projects/pagination/lib/h.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/j.rb
test_projects/pagination/lib/j.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/l.rb
test_projects/pagination/lib/l.rb
# nothing to see here
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/f.rb
test_projects/pagination/lib/f.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/pagination/lib/b.rb
test_projects/pagination/lib/b.rb
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/spec/a_spec.rb
test_projects/parallel_tests/spec/a_spec.rb
# frozen_string_literal: true require "spec_helper" describe A do it "foo" do expect(subject.foo).to eq :foo end it "cond" do expect(subject.cond(false)).to eq :no end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/spec/b_spec.rb
test_projects/parallel_tests/spec/b_spec.rb
# frozen_string_literal: true require "spec_helper" describe B do it "bar" do expect(subject.bar).to eq :bar end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/spec/d_spec.rb
test_projects/parallel_tests/spec/d_spec.rb
# frozen_string_literal: true require "spec_helper" describe D do it "case 4" do expect(subject.case(4)).to eq :foo end it "case nil" do expect(subject.case(nil)).to eq :nope end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/spec/c_spec.rb
test_projects/parallel_tests/spec/c_spec.rb
# frozen_string_literal: true require "spec_helper" describe C do it "guard" do expect(subject.guard(42)).to be_nil end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/spec/spec_helper.rb
test_projects/parallel_tests/spec/spec_helper.rb
# frozen_string_literal: true # We're injecting simplecov_config via aruba in cucumber here # depending on what the test case is... begin require File.join(File.dirname(__FILE__), "simplecov_config") rescue LoadError warn "No SimpleCov config file found!" end require_relative "../lib/all"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/lib/c.rb
test_projects/parallel_tests/lib/c.rb
# frozen_string_literal: true class C def guard(arg) return if arg == 42 :super end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/lib/d.rb
test_projects/parallel_tests/lib/d.rb
# frozen_string_literal: true class D def case(arg) case arg when 0...23 :foo when 40..50 :bar when Integer :baz else :nope end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/lib/a.rb
test_projects/parallel_tests/lib/a.rb
# frozen_string_literal: true class A def foo :foo end def cond(arg) if arg :yes else :no end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/lib/b.rb
test_projects/parallel_tests/lib/b.rb
# frozen_string_literal: true class B def foo :foo end def bar :bar end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/parallel_tests/lib/all.rb
test_projects/parallel_tests/lib/all.rb
# frozen_string_literal: true require_relative "a" require_relative "b" require_relative "c" require_relative "d"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/monorepo/base/lib/monorepo/base.rb
test_projects/monorepo/base/lib/monorepo/base.rb
# frozen_string_literal: true module Monorepo class Base def initialize(label) @label = label end def reverse @label.reverse end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/monorepo/extra/spec/extra_spec.rb
test_projects/monorepo/extra/spec/extra_spec.rb
# frozen_string_literal: true require "spec_helper" require "monorepo/extra" RSpec.describe Monorepo::Extra do describe "#identity" do it "returns the same string" do expect(described_class.new("foo").identity).to eq("foo") end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/monorepo/extra/spec/spec_helper.rb
test_projects/monorepo/extra/spec/spec_helper.rb
# frozen_string_literal: true require "simplecov" require "monorepo/base"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/test_projects/monorepo/extra/lib/monorepo/extra.rb
test_projects/monorepo/extra/lib/monorepo/extra.rb
# frozen_string_literal: true require "monorepo/base" module Monorepo class Extra def initialize(label) @label = label end def identity Base.new(Base.new(@label).reverse).reverse end end end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov.rb
lib/simplecov.rb
# frozen_string_literal: true require "English" # Coverage may be inaccurate under JRUBY. if defined?(JRUBY_VERSION) && defined?(JRuby) && !org.jruby.RubyInstanceConfig.FULL_TRACE_ENABLED # @see https://github.com/jruby/jruby/issues/1196 # @see https://github.com/metricfu/metric_fu/pull/226 # @see https://gith...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/minitest/simplecov_plugin.rb
lib/minitest/simplecov_plugin.rb
# frozen_string_literal: true # How minitest plugins. See https://github.com/simplecov-ruby/simplecov/pull/756 for why we need this. # https://github.com/seattlerb/minitest#writing-extensions module Minitest def self.plugin_simplecov_init(_options) if defined?(SimpleCov) SimpleCov.external_at_exit = true ...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/exit_codes.rb
lib/simplecov/exit_codes.rb
# frozen_string_literal: true module SimpleCov module ExitCodes SUCCESS = 0 EXCEPTION = 1 MINIMUM_COVERAGE = 2 MAXIMUM_COVERAGE_DROP = 3 end end require_relative "exit_codes/exit_code_handling" require_relative "exit_codes/maximum_coverage_drop_check" require_relative "exit_codes/minimum_coverage_...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/command_guesser.rb
lib/simplecov/command_guesser.rb
# frozen_string_literal: true module SimpleCov # # Helper that tries to find out what test suite is running (for SimpleCov.command_name) # module CommandGuesser class << self # Storage for the original command line call that invoked the test suite. # This has got to be stored as early as possib...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/profiles.rb
lib/simplecov/profiles.rb
# frozen_string_literal: true module SimpleCov # # Profiles are SimpleCov configuration procs that can be easily # loaded using SimpleCov.start :rails and defined using # SimpleCov.profiles.define :foo do # # SimpleCov configuration here, same as in SimpleCov.configure # end # class Profiles <...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/version.rb
lib/simplecov/version.rb
# frozen_string_literal: true module SimpleCov VERSION = "0.22.0" end
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/result_adapter.rb
lib/simplecov/result_adapter.rb
# frozen_string_literal: true module SimpleCov # # Responsible for adapting the format of the coverage result whether it's default or with statistics # class ResultAdapter attr_reader :result def initialize(result) @result = result end def self.call(*args) new(*args).adapt end...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/simulate_coverage.rb
lib/simplecov/simulate_coverage.rb
# frozen_string_literal: true module SimpleCov # # Responsible for producing file coverage metrics. # module SimulateCoverage module_function # # Simulate normal file coverage report on # ruby 2.5 and return similar hash with lines and branches keys # # Happens when a file wasn't require...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/source_file.rb
lib/simplecov/source_file.rb
# frozen_string_literal: true module SimpleCov # # Representation of a source file including it's coverage data, source code, # source lines and featuring helpers to interpret that data. # class SourceFile # The full path to this source file (e.g. /User/colszowka/projects/simplecov/lib/simplecov/source_f...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/filter.rb
lib/simplecov/filter.rb
# frozen_string_literal: true module SimpleCov # # Base filter class. Inherit from this to create custom filters, # and overwrite the passes?(source_file) instance method # # # A sample class that rejects all source files. # class StupidFilter < SimpleCov::Filter # def passes?(source_file) # fals...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/last_run.rb
lib/simplecov/last_run.rb
# frozen_string_literal: true require "json" module SimpleCov module LastRun class << self def last_run_path File.join(SimpleCov.coverage_path, ".last_run.json") end def read return nil unless File.exist?(last_run_path) json = File.read(last_run_path) return n...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/result.rb
lib/simplecov/result.rb
# frozen_string_literal: true require "digest/sha1" require "forwardable" module SimpleCov # # A simplecov code coverage result, initialized from the Hash Ruby's built-in coverage # library generates (Coverage.result). # class Result extend Forwardable # Returns the original Coverage.result used for...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/combine.rb
lib/simplecov/combine.rb
# frozen_string_literal: true module SimpleCov # Functionally for combining coverage results # module Combine module_function # # Combine two coverage based on the given combiner_module. # # Combiners should always be called through this interface, # as it takes care of short-circuiting of...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/no_defaults.rb
lib/simplecov/no_defaults.rb
# frozen_string_literal: true ENV["SIMPLECOV_NO_DEFAULTS"] = "yes, no defaults" require_relative "../simplecov"
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/useless_results_remover.rb
lib/simplecov/useless_results_remover.rb
# frozen_string_literal: true module SimpleCov # # Select the files that related to working scope directory of SimpleCov # module UselessResultsRemover def self.call(coverage_result) coverage_result.select do |path, _coverage| path =~ root_regx end end def self.root_regx ...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/configuration.rb
lib/simplecov/configuration.rb
# frozen_string_literal: true require "fileutils" require "docile" require_relative "formatter/multi_formatter" module SimpleCov # # Bundles the configuration options used for SimpleCov. All methods # defined here are usable from SimpleCov directly. Please check out # SimpleCov documentation for further info....
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/process.rb
lib/simplecov/process.rb
# frozen_string_literal: true module Process class << self def fork_with_simplecov(&block) if defined?(SimpleCov) && SimpleCov.running fork_without_simplecov do SimpleCov.at_fork.call(Process.pid) yield if block end else fork_without_simplecov(&block) ...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/result_merger.rb
lib/simplecov/result_merger.rb
# frozen_string_literal: true require "json" module SimpleCov # # Singleton that is responsible for caching, loading and merging # SimpleCov::Results into a single result for coverage analysis based # upon multiple test suites. # module ResultMerger class << self # The path to the .resultset.jso...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/default_formatter.rb
lib/simplecov/default_formatter.rb
# frozen_string_literal: true require "simplecov-html" module SimpleCov module Formatter class << self def from_env(env) formatters = [SimpleCov::Formatter::HTMLFormatter] # When running under a CI that uses CodeClimate, JSON output is expected if env.fetch("CC_TEST_REPORTER_ID", n...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false
simplecov-ruby/simplecov
https://github.com/simplecov-ruby/simplecov/blob/afcf15e42fde20abbdb6fe9591a3e5d98acc088e/lib/simplecov/file_list.rb
lib/simplecov/file_list.rb
# frozen_string_literal: true module SimpleCov # An array of SimpleCov SourceFile instances with additional collection helper # methods for calculating coverage across them etc. class FileList include Enumerable extend Forwardable def_delegators :@files, # For Enumerable ...
ruby
MIT
afcf15e42fde20abbdb6fe9591a3e5d98acc088e
2026-01-04T15:45:13.013465Z
false