From 15f795464d6a10efd8c7fb92b5af96d803804de3 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 25 Sep 2022 11:21:34 +0900 Subject: [PATCH] Add a project spec for future changelog entry Follow up https://github.com/rubocop/rubocop/pull/10991. --- CONTRIBUTING.md | 3 +-- test/project_test.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fea8682f..a362941c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,8 +50,7 @@ $ rubocop -V Here are a few examples: ``` -* [#716](https://github.com/rubocop/rubocop-minitest/issues/716): Fixed a regression in the autocorrection logic of `MethodDefParentheses`. ([@bbatsov][]) -* New cop `ElseLayout` checks for odd arrangement of code in the `else` branch of a conditional expression. ([@bbatsov][]) +* [#172](https://github.com/rubocop/rubocop-minitest/issues/172): Fix a false positive for `Minitest/AssertPredicate` and `Minitest/RefutePredicate` when using numbered parameters. ([@koic][]) ``` * Create one file `changelog/{type}_{some_description}.md`, where `type` is `new` (New feature), `fix` or `change`, and `some_description` is unique to avoid conflicts. Task `changelog:fix` (or `:new` or `:change`) can help you. diff --git a/test/project_test.rb b/test/project_test.rb index e7310d5e..62ddf6ab 100644 --- a/test/project_test.rb +++ b/test/project_test.rb @@ -85,6 +85,15 @@ def test_body_ends_with_a_punctuation end end + def test_feature_entry_has_a_link_to_the_issue_or_pull_request_address_at_the_beginning + repo = 'rubocop/rubocop-minitest' + address_pattern = %r{\A\* \[#\d+\]\(https://github\.com/#{repo}/(issues|pull)/\d+\):} + + @feature_entries.each do |path| + assert_match(address_pattern, File.read(path)) + end + end + def test_feature_entry_has_a_link_to_the_contributors_at_the_end @feature_entries.each do |path| assert_match(/\(\[@\S+\]\[\](?:, \[@\S+\]\[\])*\)$/, File.read(path))