# File test/test_import_tar.rb, line 61 def test_tar_remote web_server do # Try to get the file through the http server pkg = Package.new File.join(TestTools.tempdir, 'tarimport'), 'tarimport' importer = TarImporter.new 'http://localhost:2000/files/data/tarimport.tar.gz', :cachedir => @cachedir importer.checkout(pkg) assert(File.directory?(pkg.srcdir)) assert(!importer.update_cache) sleep 2 # The Time class have a 1-second resolution FileUtils.touch @tarfile assert(importer.update_cache) assert(!importer.update_cache) end end