Skip to content

Commit

Permalink
Merge pull request #584 from jackjennings/criticaljack/fix-base-expect
Browse files Browse the repository at this point in the history
Fix order of arguments in `Standard::Base` test assertions
  • Loading branch information
searls authored Oct 11, 2023
2 parents 6e5cf28 + 47d046f commit d230e85
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit d230e85

Please sign in to comment.