It doesn’t detect anything, near as I can tell. It just reads in requirements.txt and generates its internal dependency list, then blindly munges that dependency data into Requires: lines.
(There’s even some special-casing in rpm.rb for rubygem dependencies, specifically:)
# Convert 'rubygem-foo' provides values to 'rubygem(foo)'
# since that's what most rpm packagers seem to do.
There’s nothing I can find in the code that verifies the actual existence of those dependencies as available packages, and their names will only be correct if the packager followed the same formula in generating the package name.