testdouble / suture

🏥 A Ruby gem that helps you refactor your legacy code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Record mode: Should we dup arguments?

searls opened this issue · comments

There is a risk that legacy code will modify the arguments when we call. If we wait to record things until after invoking the subject method, then we could:

  1. Immediately create the observations record and dump the args before calling the legacy code
  2. Duplicate the args we persist from the ones we pass