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
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/models/organization.rb
lib/fabricio/models/organization.rb
require 'fabricio/models/abstract_model' module Fabricio module Model # This model represents an organization class Organization < AbstractModel attr_reader :id, :alias, :name, :apps_counts # Returns a Build model object # # @param attributes [Hash] # @return [Fabricio::Model::...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/models/abstract_model.rb
lib/fabricio/models/abstract_model.rb
module Fabricio module Model # Defines a base class for all data models class AbstractModel # Plain data from the server attr_accessor :json # We use `method_missing` approach here to allow a user query any field from the original data structure sent by server. def method_missing(*arg...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/request_model.rb
lib/fabricio/networking/request_model.rb
module Fabricio module Networking # A data structure that provides all values necessary for making an API request class RequestModel attr_accessor :type, :base_url, :api_path, :headers, :body, :params # Initializes a new RequestModel object. You can use a block to fill all the options: # m...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/organization_request_model_factory.rb
lib/fabricio/networking/organization_request_model_factory.rb
require 'fabricio/networking/request_model_factory' require 'fabricio/networking/request_model' module Fabricio module Networking # This factory creates request models for fetching data for Organization model object class OrganizationRequestModelFactory < RequestModelFactory # Returns a request model ...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/app_request_model_factory.rb
lib/fabricio/networking/app_request_model_factory.rb
require 'fabricio/networking/request_model_factory' require 'fabricio/networking/request_model' require 'json' module Fabricio module Networking # This factory creates request models for fetching data for App model object class AppRequestModelFactory < RequestModelFactory # Returns a request model for...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/request_model_factory.rb
lib/fabricio/networking/request_model_factory.rb
require 'json' require 'fabricio/networking/request_model' module Fabricio module Networking # This factory creates request models for fetching data for App model object class RequestModelFactory # Server constants FABRIC_API_URL = 'https://fabric.io' FABRIC_GRAPHQL_API_URL = 'https://api-d...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/version_request_model_factory.rb
lib/fabricio/networking/version_request_model_factory.rb
require 'fabricio/networking/request_model_factory' require 'fabricio/networking/request_model' module Fabricio module Networking # This factory creates request models for fetching data for Version model object class VersionRequestModelFactory < RequestModelFactory # Returns a request model for obtain...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/network_client.rb
lib/fabricio/networking/network_client.rb
require 'faraday' require 'fabricio/networking/request_model' require 'fabricio/authorization/authorization_client' require 'fabricio/authorization/abstract_session_storage' module Fabricio module Networking # This class makes network requests based on request models class NetworkClient # Initializes ...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/networking/build_request_model_factory.rb
lib/fabricio/networking/build_request_model_factory.rb
require 'fabricio/networking/request_model_factory' require 'fabricio/networking/request_model' module Fabricio module Networking # This factory creates request models for fetching data for Build model object class BuildRequestModelFactory < RequestModelFactory # Returns a request model for obtaining ...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/cli/version.rb
lib/fabricio/cli/version.rb
require 'thor' require 'fabricio' require 'fileutils' require 'yaml' require_relative 'cli_helper' module Fabricio class Version < Thor desc "all", "Obtain all versions" option :app_id, :type => :string def all hash = prepared_options(options) say("#{client.version.all(hash).to_json}") e...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/cli/build.rb
lib/fabricio/cli/build.rb
require 'thor' require 'fabricio' require 'fileutils' require 'yaml' require_relative 'cli_helper' module Fabricio class Build < Thor desc "all", "Obtain all builds" option :org_id, :type => :string option :app_id, :type => :string option :short, :type => :boolean def all hash = prepared_o...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/cli/app.rb
lib/fabricio/cli/app.rb
require 'thor' require 'fabricio' require 'fileutils' require 'yaml' require_relative 'cli_helper' module Fabricio class App < Thor desc "all", "Obtain all apps" option :short, :type => :boolean def all apps = client.app.all if options[:short] say(apps.map {|app| app.pretty_print}.jo...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/cli/organization.rb
lib/fabricio/cli/organization.rb
require 'thor' require 'fabricio' require 'fileutils' require 'yaml' require_relative 'cli_helper' module Fabricio class Organization < Thor desc "all", "Get all organization" option :short, :type => :boolean def all organizations = client.organization.all if options[:short] say(orga...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/cli/cli.rb
lib/fabricio/cli/cli.rb
require 'thor' require 'fabricio' require 'fileutils' require 'yaml' require 'fabricio/authorization/file_session_storage' require_relative 'organization' require_relative 'app' require_relative 'build' require_relative 'version' require_relative 'cli_helper' module Fabricio class CLI < Thor desc "organization...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/cli/cli_helper.rb
lib/fabricio/cli/cli_helper.rb
require 'fabricio' require 'fabricio/authorization/file_session_storage' require 'fabricio/authorization/file_param_storage' require 'fileutils' require 'yaml' def client session_storage = Fabricio::Authorization::FileSessionStorage.new() param_storage = Fabricio::Authorization::FileParamStorage.new() session = ...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
strongself/fabricio
https://github.com/strongself/fabricio/blob/8b06328598e0a8ff5d283feac416727e8a5acb19/lib/fabricio/client/client.rb
lib/fabricio/client/client.rb
require 'fabricio/models/organization' require 'fabricio/services/organization_service' require 'fabricio/services/app_service' require 'fabricio/services/build_service' require 'fabricio/services/version_service' require 'fabricio/authorization/authorization_client' require 'fabricio/authorization/session' require 'fa...
ruby
MIT
8b06328598e0a8ff5d283feac416727e8a5acb19
2026-01-04T17:32:29.574074Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/tasks/changelog.rb
tasks/changelog.rb
# frozen_string_literal: true # Changelog utility class Changelog ENTRIES_PATH = 'changelog/' FIRST_HEADER = /#{Regexp.escape("## master (unreleased)\n")}/m.freeze ENTRIES_PATH_TEMPLATE = "#{ENTRIES_PATH}%<type>s_%<name>s.md" TYPE_REGEXP = /#{Regexp.escape(ENTRIES_PATH)}([a-z]+)_/.freeze TYPE_TO_HEADER = { n...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/project_test.rb
test/project_test.rb
# frozen_string_literal: true require_relative 'test_helper' class ProjectTest < Minitest::Test def setup @issues = [] @bodies = [] load_changelog load_feature_entries end def test_changelog_has_newline_at_end_of_file assert(@changelog.end_with?("\n")) end def test_changelog_has_eithe...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/test_helper.rb
test/test_helper.rb
# frozen_string_literal: true require_relative '../lib/rubocop-minitest' # Require supporting files exposed for testing. require_relative '../lib/rubocop/minitest/support' require 'minitest/autorun' require 'minitest/pride' require 'minitest/proveit' Minitest::Test.class_eval do prove_it! end
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_silent_test.rb
test/rubocop/cop/minitest/assert_silent_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertSilentTest < Minitest::Test def test_registers_offense_when_using_assert_output_with_empty_strings assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_output("", "") do ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/non_executable_test_method_test.rb
test/rubocop/cop/minitest/non_executable_test_method_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class NonExecutableTestMethodTest < Minitest::Test def test_registers_offense_when_test_method_is_defined_outside_minitest_test_class assert_offense(<<~RUBY) class FooTest < Minitest::Test end def test_foo ^^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/return_in_test_case_method_test.rb
test/rubocop/cop/minitest/return_in_test_case_method_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class ReturnInTestMethodTest < Minitest::Test def test_registers_offense_when_using_return_inside_test_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_foo return if something? ^^^^^^ Us...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_match_test.rb
test/rubocop/cop/minitest/assert_match_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertMatchTest < Minitest::Test %i[match match? =~].each do |matcher| define_method("test_registers_offense_when_using_assert_with_#{matcher}") do assert_offense(<<~RUBY, matcher: matcher) class FooTest < Minitest::Test ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/test_method_name_test.rb
test/rubocop/cop/minitest/test_method_name_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class TestMethodNameTest < Minitest::Test def test_registers_offense_when_test_method_without_prefix assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal(expected, actual) e...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/lifecycle_hooks_order_test.rb
test/rubocop/cop/minitest/lifecycle_hooks_order_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class LifecycleHooksOrderTest < Minitest::Test def test_registers_offense_when_hooks_are_not_correctly_ordered assert_offense(<<~RUBY) class FooTest < Minitest::Test def after_teardown more_cleanup end ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_kind_of_test.rb
test/rubocop/cop/minitest/refute_kind_of_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteKindOfTest < Minitest::Test def test_registers_offense_when_using_refute_with_kind_of assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(object.kind_of?(SomeClass)) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_in_delta_test.rb
test/rubocop/cop/minitest/refute_in_delta_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteInDeltaTest < Minitest::Test def test_registers_offense_when_using_refute_equal_with_float_as_expected_value assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute_equal(0.2, fo...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/empty_line_before_assertion_methods_test.rb
test/rubocop/cop/minitest/empty_line_before_assertion_methods_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class EmptyLineBeforeAssertionMethodsTest < Minitest::Test def test_registers_offense_when_using_method_call_before_assertion_method assert_offense(<<~RUBY) def test_do_something do_something assert_equal(expected, actua...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_nil_test.rb
test/rubocop/cop/minitest/assert_nil_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertNilTest < Minitest::Test def test_registers_offense_when_using_assert_equal_with_nil assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal(nil, somestuff) ^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_output_test.rb
test/rubocop/cop/minitest/assert_output_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertOutputTest < Minitest::Test def test_registers_offense_when_mutating_output_global_variable assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something $stdout = StringIO.new puts...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_same_test.rb
test/rubocop/cop/minitest/refute_same_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteSameTest < Minitest::Test def test_registers_offense_when_using_equal assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(expected.equal?(actual)) ^^^^^^^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_equal_test.rb
test/rubocop/cop/minitest/assert_equal_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertEqualTest < Minitest::Test def test_registers_offense_when_using_assert_equal_operator_with_string assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert('rubocop-minitest' == a...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/duplicate_test_run_test.rb
test/rubocop/cop/minitest/duplicate_test_run_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class DuplicateTestRunTest < Minitest::Test def test_registers_offense_when_parent_and_child_have_tests_methods assert_offense(<<~RUBY) class ParentTest < Minitest::Test def test_parent end end class ChildTe...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_path_exists_test.rb
test/rubocop/cop/minitest/assert_path_exists_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertPathExistsTest < Minitest::Test def test_registers_offense_when_using_assert_file_exist assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(File.exist?(path)) ^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_nil_test.rb
test/rubocop/cop/minitest/refute_nil_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteNilTest < Minitest::Test def test_registers_offense_when_using_refute_equal_with_nil assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute_equal(nil, somestuff) ^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/skip_without_reason_test.rb
test/rubocop/cop/minitest/skip_without_reason_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class SkipWithoutReasonTest < Minitest::Test def test_registers_offense_when_skip_without_reason assert_offense(<<~RUBY) skip ^^^^ Add a reason explaining why the test is skipped. RUBY end def test_registers_offense_when_...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_empty_literal_test.rb
test/rubocop/cop/minitest/assert_empty_literal_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertEmptyLiteralTest < Minitest::Test def test_registers_offense_when_asserting_empty_array assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal([], somestuff) ^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/skip_ensure_test.rb
test/rubocop/cop/minitest/skip_ensure_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class SkipEnsureTest < Minitest::Test def test_registers_offense_when_using_skip_in_the_method_body assert_offense(<<~RUBY) def test_skip skip 'This test is skipped.' assert 'foo'.present? ensure ^^^^^^ `ens...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_false_test.rb
test/rubocop/cop/minitest/refute_false_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteFalseTest < Minitest::Test def test_registers_offense_when_using_assert_equal_with_false assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal(false, somestuff) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_equal_test.rb
test/rubocop/cop/minitest/refute_equal_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteEqualTest < Minitest::Test def test_registers_offense_when_using_assert_not_equal_operator_with_string assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert('rubocop-minitest' ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_predicate_test.rb
test/rubocop/cop/minitest/refute_predicate_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefutePredicateTest < Minitest::Test def test_registers_offense_when_using_refute_with_predicate_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(obj.one?) ^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_raises_with_regexp_argument_test.rb
test/rubocop/cop/minitest/assert_raises_with_regexp_argument_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertRaisesWithRegexpArgumentTest < Minitest::Test def test_registers_offense_with_regexp assert_offense(<<~RUBY) assert_raises(MyError, /some message/) do ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Do not pass regular expressi...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_includes_test.rb
test/rubocop/cop/minitest/assert_includes_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertIncludesTest < Minitest::Test def test_registers_offense_when_using_assert_with_include assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(collection.include?(object)) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/unreachable_assertion_test.rb
test/rubocop/cop/minitest/unreachable_assertion_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class UnreachableAssertionTest < Minitest::Test def test_registers_offense_when_using_assert_equal_at_bottom_of_assert_raises_block assert_offense(<<~RUBY) assert_raises FooError do obj.foo assert_equal('foo', obj.bar) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_with_expected_argument_test.rb
test/rubocop/cop/minitest/assert_with_expected_argument_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertWithExpectedArgumentTest < Minitest::Test def test_registers_offense_when_second_argument_is_not_a_string assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something my_list = [1, 2, 3] ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/redundant_message_argument_test.rb
test/rubocop/cop/minitest/redundant_message_argument_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RedundantMessageArgumentTest < Minitest::Test def test_registers_offense_when_using_redundant_message_argument_in_assert assert_offense(<<~RUBY) assert(test, nil) ^^^ Remove the redundant message argument. R...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assertion_in_lifecycle_hook_test.rb
test/rubocop/cop/minitest/assertion_in_lifecycle_hook_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertionInLifecycleHookTest < Minitest::Test def test_registers_offense_when_using_bad_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def setup assert_equal(foo, bar) ^^^^^^^^^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_instance_of_test.rb
test/rubocop/cop/minitest/refute_instance_of_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteInstanceOfTest < Minitest::Test def test_registers_offense_when_using_refute_with_instance_of assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(object.instance_of?(SomeClas...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_match_test.rb
test/rubocop/cop/minitest/refute_match_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteMatchTest < Minitest::Test %i[match match? =~].each do |matcher| define_method("test_registers_offense_when_using_refute_with_#{matcher}") do assert_offense(<<~RUBY, matcher: matcher) class FooTest < Minitest::Test ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_offense_test.rb
test/rubocop/cop/minitest/assert_offense_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertOffenseTest class CopNotDefinedTest < Minitest::Test def test_correct_failure_is_raised_when_cop_is_not_defined error = assert_raises RuntimeError do assert_offense(<<~RUBY) class FooTest < Minitest::Test ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_kind_of_test.rb
test/rubocop/cop/minitest/assert_kind_of_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertKindOfTest < Minitest::Test def test_registers_offense_when_using_assert_with_kind_of assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(object.kind_of?(SomeClass)) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_empty_test.rb
test/rubocop/cop/minitest/assert_empty_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertEmptyTest < Minitest::Test def test_registers_offense_when_using_assert_with_empty assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(somestuff.empty?) ^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_operator_test.rb
test/rubocop/cop/minitest/refute_operator_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteOperatorTest < Minitest::Test def test_registers_offense_when_using_refute_with_operator_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(expected < actual) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/unspecified_exception_test.rb
test/rubocop/cop/minitest/unspecified_exception_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class UnspecifiedExceptionTest < Minitest::Test def test_registers_offense_when_using_assert_raises_without_exception assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_raises { raise F...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_same_test.rb
test/rubocop/cop/minitest/assert_same_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertSameTest < Minitest::Test def test_registers_offense_when_using_equal assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(expected.equal?(actual)) ^^^^^^^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/no_test_cases_test.rb
test/rubocop/cop/minitest/no_test_cases_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class NoTestCases < Minitest::Test def test_registers_offense_for_empty_test_class assert_offense(<<~RUBY) class FooTest < Minitest::Test ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Test class should have test cases. end RUBY end ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/global_expectations_test.rb
test/rubocop/cop/minitest/global_expectations_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class GlobalExpectationsTest < Minitest::Test UNDERSCORE_ANY_STYLES = %i[_ any].freeze VALUE_ANY_STYLES = %i[value any].freeze EXPECT_ANY_STYLES = %i[expect any].freeze def setup configure_enforced_style(style) end def style :...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/non_public_test_method_test.rb
test/rubocop/cop/minitest/non_public_test_method_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class NonPublicTestMethodTest < Minitest::Test def test_registers_offense_when_using_private_test_method assert_offense(<<~RUBY) class FooTest < Minitest::Test private def test_does_something ^^^^^^^^^^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_respond_to_test.rb
test/rubocop/cop/minitest/assert_respond_to_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertRespondToTest < Minitest::Test def test_registers_offense_when_using_assert_calling_respond_to_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(object.respond_to?(:...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_path_exists_test.rb
test/rubocop/cop/minitest/refute_path_exists_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefutePathExistsTest < Minitest::Test def test_registers_offense_when_using_refute_file_exist assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(File.exist?(path)) ^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/literal_as_actual_argument_test.rb
test/rubocop/cop/minitest/literal_as_actual_argument_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class LiteralAsActualArgumentTest < Minitest::Test def test_registers_offense_when_actual_is_basic_literal assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal(foo, 2) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_in_delta_test.rb
test/rubocop/cop/minitest/assert_in_delta_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertInDeltaTest < Minitest::Test def test_registers_offense_when_using_assert_equal_with_float_as_expected_value assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal(0.2, fo...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/multiple_assertions_test.rb
test/rubocop/cop/minitest/multiple_assertions_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class MultipleAssertionsTest < Minitest::Test def setup configure_max_assertions(1) end def test_registers_offense_when_multiple_expectations assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_asserts_twice...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_respond_to_test.rb
test/rubocop/cop/minitest/refute_respond_to_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteRespondToTest < Minitest::Test def test_registers_offense_when_using_refute_calling_respond_to_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(object.respond_to?(:...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/useless_assertion_test.rb
test/rubocop/cop/minitest/useless_assertion_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class UselessAssertionTest < Minitest::Test %i[assert refute assert_nil refute_nil assert_not assert_empty refute_empty].each do |matcher| define_method("test_#{matcher}_registers_offense_when_using_literals") do assert_offense(<<~RUBY,...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/test_file_name_test.rb
test/rubocop/cop/minitest/test_file_name_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class TestFileNameTest < Minitest::Test def test_registers_offense_for_invalid_path offenses = inspect_source(<<~RUBY, cop, 'lib/foo.rb') class FooTest < Minitest::Test end RUBY message = 'Test file path should start with ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_instance_of_test.rb
test/rubocop/cop/minitest/assert_instance_of_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertInstanceOfTest < Minitest::Test def test_registers_offense_when_using_assert_with_instance_of assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(object.instance_of?(SomeClas...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_predicate_test.rb
test/rubocop/cop/minitest/assert_predicate_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertPredicateTest < Minitest::Test def test_registers_offense_when_using_assert_with_predicate_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(obj.one?) ^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_operator_test.rb
test/rubocop/cop/minitest/assert_operator_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertOperatorTest < Minitest::Test def test_registers_offense_when_using_assert_with_operator_method assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert(expected < actual) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/no_assertions_test.rb
test/rubocop/cop/minitest/no_assertions_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class NoAssertionsTest < Minitest::Test def test_registers_offense_when_no_assertions assert_offense(<<~RUBY) class FooTest < Minitest::Test include Foo setup { } teardown { } def test_valid_test ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_raises_compound_body_test.rb
test/rubocop/cop/minitest/assert_raises_compound_body_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertRaisesCompoundBodyTest < Minitest::Test def test_registers_offense_when_multi_statement_bodies assert_offense(<<~RUBY) assert_raises(MyError) do ^^^^^^^^^^^^^^^^^^^^^^^^^ Reduce `assert_raises` block body to contain on...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_includes_test.rb
test/rubocop/cop/minitest/refute_includes_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteIncludesTest < Minitest::Test def test_registers_offense_when_using_refute_with_include assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(collection.include?(object)) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/refute_empty_test.rb
test/rubocop/cop/minitest/refute_empty_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class RefuteEmptyTest < Minitest::Test def test_registers_offense_when_using_refute_with_empty assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something refute(somestuff.empty?) ^^^^^^^^^^^...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/assert_truthy_test.rb
test/rubocop/cop/minitest/assert_truthy_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class AssertTruthyTest < Minitest::Test def test_registers_offense_when_using_assert_equal_with_true assert_offense(<<~RUBY) class FooTest < Minitest::Test def test_do_something assert_equal(true, somestuff) ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/minitest/focus_test.rb
test/rubocop/cop/minitest/focus_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class FocusTest < Minitest::Test def test_registers_offense_when_using_direct_focus assert_offense(<<~RUBY) class FooTest < Minitest::Test focus test 'foo' do ^^^^^ Remove `focus` from tests. end end RU...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/test/rubocop/cop/mixin/minitest_exploration_helpers_test.rb
test/rubocop/cop/mixin/minitest_exploration_helpers_test.rb
# frozen_string_literal: true require_relative '../../../test_helper' class MinitestExplorationHelpersTest < Minitest::Test module Helper extend RuboCop::Cop::MinitestExplorationHelpers class << self public :test_case? end end SOURCE = <<~RUBY class FooTest < Minitest::Test def not...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop-minitest.rb
lib/rubocop-minitest.rb
# frozen_string_literal: true require 'rubocop' require_relative 'rubocop/minitest' require_relative 'rubocop/minitest/version' require_relative 'rubocop/minitest/plugin' require_relative 'rubocop/cop/minitest_cops'
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/minitest.rb
lib/rubocop/minitest.rb
# frozen_string_literal: true module RuboCop # RuboCop minitest project namespace. module Minitest end end
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/minitest/version.rb
lib/rubocop/minitest/version.rb
# frozen_string_literal: true module RuboCop module Minitest # This module holds the RuboCop Minitest version information. module Version STRING = '0.38.2' def self.document_version STRING.match('\d+\.\d+').to_s end end end end
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/minitest/plugin.rb
lib/rubocop/minitest/plugin.rb
# frozen_string_literal: true require 'lint_roller' module RuboCop module Minitest # A plugin that integrates RuboCop Minitest with RuboCop's plugin system. class Plugin < LintRoller::Plugin def about LintRoller::About.new( name: 'rubocop-minitest', version: Version::STRING...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/minitest/assert_offense.rb
lib/rubocop/minitest/assert_offense.rb
# frozen_string_literal: true # Laziness copied from rubocop source code require 'rubocop/rspec/expect_offense' require 'rubocop/cop/legacy/corrector' module RuboCop module Minitest # Mixin for `assert_offense` and `assert_no_offenses` # # This mixin makes it easier to specify strict offense assertions ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/minitest/support.rb
lib/rubocop/minitest/support.rb
# frozen_string_literal: true # Require this file to load code that supports testing using Minitest. require 'rubocop' require 'minitest' require_relative 'assert_offense' Minitest::Test.include RuboCop::Minitest::AssertOffense
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest_generator.rb
lib/rubocop/cop/minitest_generator.rb
# frozen_string_literal: true require 'rubocop/cop/generator' module RuboCop module Cop # Source and test generator for new cops # # This generator will take a cop name and generate a source file # and test file when given a valid qualified cop name. module MinitestGenerator TEST_TEMPLATE ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest_cops.rb
lib/rubocop/cop/minitest_cops.rb
# frozen_string_literal: true require_relative 'mixin/argument_range_helper' require_relative 'mixin/in_delta_mixin' require_relative 'mixin/instance_of_assertion_handleable' require_relative 'mixin/minitest_cop_rule' require_relative 'mixin/minitest_exploration_helpers' require_relative 'mixin/nil_assertion_handleabl...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/global_expectations.rb
lib/rubocop/cop/minitest/global_expectations.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for deprecated global expectations # and autocorrects them to use expect format. # # @example EnforcedStyle: any (default) # # bad # musts.must_equal expected_musts # wonts.wont_match ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_match.rb
lib/rubocop/cop/minitest/assert_match.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_match` # instead of using `assert(matcher.match(string))`. # # @example # # bad # assert(matcher.match(string)) # assert(matcher.match?(string)) # ass...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/unreachable_assertion.rb
lib/rubocop/cop/minitest/unreachable_assertion.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for `assert_raises` has an assertion method at # the bottom of block because the assertion will be never reached. # # @example # # # bad # assert_raises FooError do # obj.occur...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_operator.rb
lib/rubocop/cop/minitest/assert_operator.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the use of `assert_operator(expected, :<, actual)` over `assert(expected < actual)`. # # @example # # # bad # assert(expected < actual) # # # good # assert_operator(exp...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_raises_with_regexp_argument.rb
lib/rubocop/cop/minitest/assert_raises_with_regexp_argument.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for `assert_raises` with arguments of regular expression literals. # Arguments should be exception classes. # Optionally the last argument can be a custom message string to help explain failures. # Either way...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_predicate.rb
lib/rubocop/cop/minitest/assert_predicate.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_predicate` # instead of using `assert(obj.a_predicate_method?)`. # # @example # # bad # assert(obj.one?) # assert(obj.one?, 'message') # # # goo...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_in_delta.rb
lib/rubocop/cop/minitest/assert_in_delta.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_in_delta` # instead of using `assert_equal` to compare floats. # # @example # # bad # assert_equal(0.2, actual) # assert_equal(0.2, actual, 'message') #...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_includes.rb
lib/rubocop/cop/minitest/refute_includes.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_includes` # instead of using `refute(collection.include?(object))`. # # @example # # bad # refute(collection.include?(object)) # refute(collection.include?(ob...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/refute_in_delta.rb
lib/rubocop/cop/minitest/refute_in_delta.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_in_delta` # instead of using `refute_equal` to compare floats. # # @example # # bad # refute_equal(0.2, actual) # refute_equal(0.2, actual, 'message') #...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/skip_without_reason.rb
lib/rubocop/cop/minitest/skip_without_reason.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks for skipped tests missing the skipping reason. # # @example # # bad # skip # skip('') # # # bad # if condition? # skip # else # skip #...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/literal_as_actual_argument.rb
lib/rubocop/cop/minitest/literal_as_actual_argument.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces correct order of expected and # actual arguments for `assert_equal`. # # @example # # bad # assert_equal foo, 2 # assert_equal foo, [1, 2] # assert_equal foo, [1, 2], 'messag...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/multiple_assertions.rb
lib/rubocop/cop/minitest/multiple_assertions.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks if test cases contain too many assertion calls. If conditional code with assertions # is used, the branch with maximum assertions is counted. # The maximum allowed assertion calls is configurable. # # @...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/skip_ensure.rb
lib/rubocop/cop/minitest/skip_ensure.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Checks that code in an `ensure` block does not run when the test is skipped. # If `skip` is conditional, the `ensure` block must also be conditional, # using the negation of the skip condition so that it runs only when th...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/assert_kind_of.rb
lib/rubocop/cop/minitest/assert_kind_of.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_kind_of(Class, object)` # over `assert(object.kind_of?(Class))`. # # @example # # bad # assert(object.kind_of?(Class)) # assert(object.kind_of?(Class), 'messa...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/useless_assertion.rb
lib/rubocop/cop/minitest/useless_assertion.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Detects useless assertions (assertions that either always pass or always fail). # # @example # # bad # assert true # assert_equal @foo, @foo # assert_nil [foo, bar] # # # good...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false
rubocop/rubocop-minitest
https://github.com/rubocop/rubocop-minitest/blob/74f57d14340d828a918df8250519490512a8dd03/lib/rubocop/cop/minitest/non_public_test_method.rb
lib/rubocop/cop/minitest/non_public_test_method.rb
# frozen_string_literal: true module RuboCop module Cop module Minitest # Detects non `public` (marked as `private` or `protected`) test methods. # Minitest runs only test methods which are `public`. # # @example # # bad # class FooTest # private # or protected ...
ruby
MIT
74f57d14340d828a918df8250519490512a8dd03
2026-01-04T17:32:25.612399Z
false