There is also a lot of duplication here (duplication is bad because it means in the future we may need to change code in multiple places).

I think you should take this whole test and make it into a function that takes `option` as an argument. Then in your main test function you will simply call this function three times, once with each option flag.