Improved replacement of errors_on to be more Rspec 3-ey.

[#74580252]