Use `assert_raises` when testing attempts option.