could we the `gsub` logic move to `assert_run_plan` method. Also, the pipe is distracting: I would suggest finding the least indentation in the lines, and shortening all the lines with this number.