DRYed method undef in template tests