Closed benjamin-feder closed 6 years ago
@benjamin-feder I tried to reproduce. Your SCT is wrong. Do not pipe the state check_object()
produces into check_function()
!
The following should work:
ex() %>% check_function("count", index = 1) %>% check_result() %>% check_equal()
ex() %>% check_function("count", index = 2) %>% check_result() %>% check_equal()
ex() %>% check_error()
This would be a better SCT even:
test_correct(
ex() %>% check_object("bakers_by_series") %>% check_equal(),
ex() %>% check_function("count", index = 1) %>% check_result() %>% check_equal()
)
ex() %>% check_function("count", index = 2) %>% check_result() %>% check_equal()
Let me know if something is not clear. Please verify that the highlighting is correct now, and let me know when it isn't!
Here's the details of the question:
@pre_exercise_code
@sample_code
@solution
@sct
Let's say instead of counting by series, we decided to count by baker by accident in the second part of the solution code. For some reason, the sct marks this as incorrect, but highlights the first part of the code with the assignment, even though it's the second chunk that is wrong.