inspection hook up?

I thought the law was also that you could get an exception from the inspection if you spend $400 or more on repairs and it still doesn’t pass??