Skip to content

Commit 86f2182

Browse files
committed
Add a project spec for future changelog entry
Follow up rubocop/rubocop#10991.
1 parent 7e37f65 commit 86f2182

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Here are a few examples:
5151

5252
```
5353
* [#67](https://github.com/rubocop/rubocop-rails/issues/67): Fix an incorrect autocorrect for `Rails/TimeZone` when using `DateTime`. ([@koic][])
54-
* New cop `ElseLayout` checks for odd arrangement of code in the `else` branch of a conditional expression. ([@bbatsov][])
5554
```
5655

5756
* 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.

spec/project_spec.rb

+7
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@
215215

216216
include_examples 'has Changelog format'
217217

218+
it 'has a link to the issue or pull request address at the beginning' do
219+
repo = 'rubocop/rubocop-rails'
220+
address_pattern = %r{\A\* \[#\d+\]\(https://github\.com/#{repo}/(issues|pull)/\d+\):}
221+
222+
expect(entries).to all(match(address_pattern))
223+
end
224+
218225
it 'has a link to the contributors at the end' do
219226
expect(entries).to all(match(/\(\[@\S+\]\[\](?:, \[@\S+\]\[\])*\)$/))
220227
end

0 commit comments

Comments
 (0)