Permalink
Browse files

create docs

  • Loading branch information...
0 parents commit d3066887042bd9927a9f6d4876f724b7e015e1dc @spicycode spicycode committed Oct 9, 2009
@@ -0,0 +1 @@
+pkg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>SpecConverter</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
+ <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
+ <script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
+</head>
+
+<body>
+ <div class="banner">
+ <h1>
+ <span class="type">Class</span>
+ SpecConverter
+
+ <span class="parent">&lt;
+
+ Object
+
+ </span>
+
+ </h1>
+ <ul class="files">
+
+ <li><a href="../files/lib/spec_converter_rb.html">lib/spec_converter.rb</a></li>
+
+ </ul>
+ </div>
+ <div id="bodyContent">
+ <div id="content">
+
+ <div class="description">
+ <p>
+Simple converter to go to test/spec style This will change all files in
+place, so make sure you are properly backed up and/or committed to SVN!
+</p>
+
+ </div>
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Methods</div>
+ <dl class="methods">
+
+ <dt>C</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000001">convert</a>,</li>
+
+ <li><a href="#M000003">convert_line</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>S</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000000">start</a></li>
+
+ </ul>
+ </dd>
+
+ <dt>T</dt>
+ <dd>
+ <ul>
+
+ <li><a href="#M000002">translate_file</a></li>
+
+ </ul>
+ </dd>
+
+ </dl>
+
+
+
+
+
+
+
+
+
+ <div class="sectiontitle">Constants</div>
+ <table border='0' cellpadding='5'>
+
+ <tr valign='top'>
+ <td class="attr-name">VERSION</td>
+ <td>=</td>
+ <td class="attr-value">&quot;0.0.4&quot;</td>
+ </tr>
+
+
+ </table>
+
+
+
+
+
+ <div class="sectiontitle">Class Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000000">
+
+ <a name="M000000"></a><b>start</b>()
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
+
+ | <a href="http://github.com/relevance/spec_converter/blob/d7d29fb4c35436d5af3a4d83340f6e208a7f5b21/lib/spec_converter.rb#L6" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000000_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/spec_converter.rb, line 6</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">start</span>
+ <span class="ruby-identifier">spec_converter</span> = <span class="ruby-constant">SpecConverter</span>.<span class="ruby-identifier">new</span>
+ <span class="ruby-identifier">spec_converter</span>.<span class="ruby-identifier">convert</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="sectiontitle">Instance Public methods</div>
+
+ <div class="method">
+ <div class="title" id="M000001">
+
+ <a name="M000001"></a><b>convert</b>()
+
+ </div>
+
+ <div class="description">
+ <p>
+Convert tests from old spec style to new style &#8212; assumes you are in
+your project root and globs all tests in your test directory.
+</p>
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
+
+ | <a href="http://github.com/relevance/spec_converter/blob/d7d29fb4c35436d5af3a4d83340f6e208a7f5b21/lib/spec_converter.rb#L13" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000001_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/spec_converter.rb, line 13</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;No test diretory - you must run this script from your project root, which should also contain a test directory.&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-value str">&quot;test&quot;</span>)
+ <span class="ruby-identifier">tests</span> = <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-value str">'test/**/*_test.rb'</span>)
+ <span class="ruby-identifier">tests</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">test_file</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">translate_file</span>(<span class="ruby-identifier">test_file</span>)
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000003">
+
+ <a name="M000003"></a><b>convert_line</b>(line)
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
+
+ | <a href="http://github.com/relevance/spec_converter/blob/d7d29fb4c35436d5af3a4d83340f6e208a7f5b21/lib/spec_converter.rb#L33" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000003_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/spec_converter.rb, line 33</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_line</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">convert_rspec_old_style_names</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">convert_dust_style</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">convert_test_unit_class_name</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">convert_test_unit_methods</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">convert_def_setup</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">convert_assert</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-identifier">line</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="method">
+ <div class="title" id="M000002">
+
+ <a name="M000002"></a><b>translate_file</b>(file)
+
+ </div>
+
+
+
+
+ <div class="sourcecode">
+ <p class="source-link">
+ Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
+
+ | <a href="http://github.com/relevance/spec_converter/blob/d7d29fb4c35436d5af3a4d83340f6e208a7f5b21/lib/spec_converter.rb#L21" target="_blank" class="github_url">on GitHub</a>
+
+ </p>
+ <div id="M000002_source" class="dyn-source">
+ <pre><span class="ruby-comment cmt"># File lib/spec_converter.rb, line 21</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">translate_file</span>(<span class="ruby-identifier">file</span>)
+ <span class="ruby-identifier">translation</span> = <span class="ruby-value str">&quot;&quot;</span>
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">io</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">io</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">translation</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">convert_line</span>(<span class="ruby-identifier">line</span>)
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-value str">&quot;w&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">io</span><span class="ruby-operator">|</span>
+ <span class="ruby-identifier">io</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">translation</span>)
+ <span class="ruby-keyword kw">end</span>
+ <span class="ruby-keyword kw">end</span></pre>
+ </div>
+ </div>
+
+ </div>
+
+</div>
+ </div>
+ </body>
+</html>
@@ -0,0 +1 @@
+Fri, 09 Oct 2009 13:49:42 -0400
Oops, something went wrong.

0 comments on commit d306688

Please sign in to comment.