doc/classes/TC_TarImporter.src/M000014.html in autobuild-0.5.1 vs doc/classes/TC_TarImporter.src/M000014.html in autobuild-0.6
- old
+ new
@@ -3,22 +3,24 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>test_tar_remote_notfound (TC_TarImporter)</title>
+ <title>web_server (TC_TarImporter)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
- <pre><span class="ruby-comment cmt"># File test/test_import_tar.rb, line 78</span>
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_tar_remote_notfound</span>
- <span class="ruby-identifier">web_server</span> <span class="ruby-keyword kw">do</span>
- <span class="ruby-comment cmt"># Try to get the file through the http server</span>
- <span class="ruby-identifier">pkg</span> = <span class="ruby-constant">Package</span>.<span class="ruby-identifier">new</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">TestTools</span>.<span class="ruby-identifier">tempdir</span>, <span class="ruby-value str">'tarimport'</span>), <span class="ruby-value str">'tarimport'</span>
- <span class="ruby-identifier">importer</span> = <span class="ruby-constant">TarImporter</span>.<span class="ruby-identifier">new</span> <span class="ruby-value str">'http://localhost:2000/files/data/tarimport-nofile.tar.gz'</span>, <span class="ruby-identifier">:cachedir</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@cachedir</span>
+ <pre><span class="ruby-comment cmt"># File test/test_import_tar.rb, line 49</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">web_server</span>
+ <span class="ruby-identifier">s</span> = <span class="ruby-constant">HTTPServer</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">:Port</span> =<span class="ruby-operator">></span> <span class="ruby-value">2000</span>, <span class="ruby-identifier">:DocumentRoot</span> =<span class="ruby-operator">></span> <span class="ruby-constant">TestTools</span>.<span class="ruby-identifier">tempdir</span>
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">mount</span>(<span class="ruby-value str">"/files"</span>, <span class="ruby-constant">HTTPServlet</span><span class="ruby-operator">::</span><span class="ruby-constant">FileHandler</span>, <span class="ruby-constant">TestTools</span>.<span class="ruby-identifier">tempdir</span>)
+ <span class="ruby-identifier">webrick</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">s</span>.<span class="ruby-identifier">start</span> }
- <span class="ruby-identifier">assert_raise</span>(<span class="ruby-constant">Autobuild</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>) { <span class="ruby-identifier">importer</span>.<span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">pkg</span>) }
- <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">yield</span>
+
+ <span class="ruby-keyword kw">ensure</span>
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">shutdown</span>
+ <span class="ruby-identifier">webrick</span>.<span class="ruby-identifier">join</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file