test on String instead of Gem::Specification

bundler has its own Bundler::RemoteSpecification class which shall be
treated the same way as Gem::Specification