Unit testing a bash script manipulating the working directory path
Just 2 cents:


I'd quote the right hand side of the [[ ... = ... ]] to avoid pattern interpretation. Cf.

x=123
y=*2*
[[ $x =  $y  ]] &amp;&amp; echo Equal without quotes
[[ $x = "$y" ]] || echo Not equal with quotes

I like naming the tests. I'd probably add a third parameter to assertEquals and include it in the report. It also improves readability. Inspired by Test::More for Perl.