I had a problem whereby a list of jobs, each represented by a character "a", "b", "c" etc, had to be sorted given that some of them depended on other jobs. So if job "a" depended on "b", and "b" and "c" didn't depend on any job, the list 'abc' would be sorted as 'bac', simple.
My problem is I want to write a test to check that jobs come after the jobs they depend on in the output array.
Example
If job "c" depends on job "f", how can I test that "f" is before "c" in
array = ["a", "b", "f", "c", "d", "e"]