Fix Rspec deprecation warning

Supplying a particular Exception with `to_not` has been deprecated.