Move test and spec helpers into src.

This way depdencies can use them too.