Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix order of arguments in Standard::Base test assertions #584

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/standard/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ def test_configures_all_rubocop_cops
end
end

assert_equal missing, [], "Configure these cops as either Enabled: true or Enabled: false in #{BASE_CONFIG}"
assert_equal extra, [], "These cops do not exist and should not be configured in #{BASE_CONFIG}"
assert_equal [], missing, "Configure these cops as either Enabled: true or Enabled: false in #{BASE_CONFIG}"
assert_equal [], extra, "These cops do not exist and should not be configured in #{BASE_CONFIG}"
end

def test_alphabetized_config
actual = YAML.load_file(BASE_CONFIG).keys - ["require"]
expected = actual.sort

assert_equal actual, expected, "Cop names should be alphabetized! (See this script to do it for you: https://github.com/standardrb/standard/pull/222#issue-744335213 )"
assert_equal expected, actual, "Cop names should be alphabetized! (See this script to do it for you: https://github.com/standardrb/standard/pull/222#issue-744335213 )"
end

private
Expand Down