Q19
Which method is commonly used to assert that a certain exception is raised in RSpec?
A.
assert_raises(ExceptionClass) { ... }
B.
expect { ... }.to throw_symbol(:exception_symbol)
C.
expect { ... }.to raise_error(ExceptionClass)
AnswerD.
assert_throw(:exception_symbol) { ... }
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board