updated deprecated rspec error-checking syntax