Skip to content

Commit

Permalink
Remove a constant that is not intended to be public
Browse files Browse the repository at this point in the history
It seems that unnecessary constant was left behind when introducing the Inject mechanism,
inspired by RuboCop RSpec, during the initial implementation of this gem.

It is used in tests, but it seems that it was not a constant that should have originally
appeared in the production code.
  • Loading branch information
koic committed Jan 8, 2025
1 parent 4f45d2a commit 30a3cbd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/rubocop/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module RuboCop
module Minitest
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze

private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
end
Expand Down
2 changes: 1 addition & 1 deletion test/rubocop/cop/minitest/global_expectations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def style
private

def configure_enforced_style(style)
all_config = RuboCop::Minitest::CONFIG
all_config = YAML.safe_load(RuboCop::Minitest.const_get(:CONFIG_DEFAULT).read).freeze
cop_config = all_config['Minitest/GlobalExpectations']
cop_config = cop_config.merge('EnforcedStyle' => style)
all_config = all_config.merge('Minitest/GlobalExpectations' => cop_config)
Expand Down

0 comments on commit 30a3cbd

Please sign in to comment.