Output capture function for specs.