In rpm 4.2, that is. Anyway, it has been described in the max-rpm CVS snapshot for some time: http://rpm-devel.colug.net/max-rpm/s1-rpm-specref-scripts.html#S3-RPM-SPE CREF-CHECK
CPAN modules often have a "make test" phase, so that looks like a good enhancement to implement in the RPM::Specfile package.
There was a long thread not long ago on the Subversion mailing list about whether end users should run tests when installing from a source RPM (consensus was "yes") so that SRPM could also benefit. (Its tests take quite awhile.)