News for hackers. Stuff that matters.
Re:Suture: A Ruby gem that helps you refactor your legacy code by danfritz on Sunday September 05, 2021 @11:39AM (#28425124)
I follow the readme of creating a seam so you get nice isolated class you can easily test. Then I would suggest to write a lot of tests, understand the code and then refactor and ensure your test still pass.

No need for a gem like this. As others point out for functional small pieces of code this might work but api endpoints I'll rather go with a "add tests" approach

Re:Suture: A Ruby gem that helps you refactor your legacy code by nerdponx on Sunday September 05, 2021 @11:52AM (#28425228)
My impression is that this tool helps you do the exploratory work required to write tests in the first place, as well as helping you split up and rewrite the code to start making it more testable.