Test for HTTP status code in some RSpec rails request exampes, but for raised exception in others Test for HTTP status code in some RSpec rails request exampes, but for raised exception in others ruby ruby