Refactor and add tests for `generators/releases.rb`
- Refactor code
- Add tests
The following discussion from !64079 (merged) should be addressed:
-
@sean_carroll started a discussion: (+1 comment) Hi @nfriend thanks for this change!
In reviewing the code, I was surprised to see that there are no tests for the existing code, before the changes on this MR. It is moderately complex code, and it is also quite visible being on our main website.
I think we should take this opportunity to add a spec for
generators/release
, we can use https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/master/spec/generators/org_chart_spec.rb as a model.I'm happy to help with this if useful.
Back to you
🏓