Unit and functional tests for spec_formatter

\cc @sersut @mcquin