I have this test:
if !(from.is_a?(String) && to.is_a?(String) && from.match(/\A\//) && to.match(/\A\//)) || internal_redirects[to].present? || !public_path?(from) || !public_path?(to)
and it's terrible. I'd like to refactor it, but since it is terrible it is hard to parse, understand and replicate correctly.
It would be much easier if the computer could do the first step and rewrite it to normal form; or something. Just so I can focus on one step at a time.
So my question is: is there such a refeactoring and I just missed it? Some plugin that could help?