Sha256: 48eb2b8ad8ee0525acb5a35a1eeec0b1c1ce16981fec7ea752ad6017594a7c5e
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__)) $LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__)) require 'test/unit' require 'test/tools' require 'autobuild/import/svn' class TC_SVNImport < Test::Unit::TestCase include Autobuild Package = Struct.new :srcdir, :name def setup Autobuild.logdir = "#{TestTools.tempdir}/log" FileUtils.mkdir_p(Autobuild.logdir) end def teardown TestTools.clean end def test_svn TestTools.untar('svnroot.tar') svnrepo = File.join(TestTools.tempdir, 'svnroot') svnroot = "file:///#{svnrepo}/svn" pkg_svn = Package.new File.join(TestTools.tempdir, 'svn'), :svn # Make a checkout with a splitted URL importer = Autobuild.svn(svnroot) importer.import(pkg_svn) assert( File.exists?(File.join(pkg_svn.srcdir, 'test')) ) # Make an update importer.import(pkg_svn) # Make an update fail FileUtils.rm_rf svnrepo assert_raise(SubcommandFailed) { importer.import(pkg_svn) } # Make a checkout fail FileUtils.rm_rf pkg_svn.srcdir assert_raise(SubcommandFailed) { importer.import(pkg_svn) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
autobuild-0.6 | test/test_import_svn.rb |