πŸ“Š Ruby
Q. 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)
  • (D) assert_throw(:exception_symbol) { ... }
πŸ’¬ Discuss
βœ… Correct Answer: (C) expect { ... }.to raise_error(ExceptionClass)

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
93
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate