Adopting legacy Rails apps
Talk to your mentor about how we're approaching applications that are either old or abandoned by a different team earlier:
- Add E2E tests for the happy path. Other than unit tests, E2E tests will not break when we refactor later.
- Always add tests on whatever we work on.
- When you work on something, improve that part of the code.
- Make sure setup for a new developer is as frictionless as possible (ideally it's
bundle && rake db:create db:migrate
). - Make sure deployment is as frictionless as possible.
- Setup failure notifications.
- Set aside some time every month to deal with the most frequent failure types until you reach an acceptable level of stability.
Also have a look at our Rails refurbishing service Show archive.org snapshot .
Refactoring Kata
Do the Gilded Rose Kata Show archive.org snapshot in Ruby.
The linked repository comes with a test suite for the existing requirements Show archive.org snapshot . Make sure you see a green test suite before you begin to move code around.
It is recommended to refactor code before you add the new requirements (conjured items).
Posted by Henning Koch to makandra Curriculum (2016-12-20 13:14)