website/index.html in faultinjection-0.0.1 vs website/index.html in faultinjection-0.0.2
- old
+ new
@@ -8,35 +8,17 @@
fault_injection.rb
</title>
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
<style>
-</style>
- <!--
- <script type="text/javascript">
- window.onload = function() {
- settings = {
- tl: { radius: 10 },
- tr: { radius: 10 },
- bl: { radius: 10 },
- br: { radius: 10 },
- antiAlias: true,
- autoPad: true,
- validTags: ["div"]
- }
- var versionBox = new curvyCorners(settings, document.getElementById("version"));
- versionBox.applyCornersToAll();
- }
- </script>
- -->
</head>
<body>
<div id="main">
<h1>fault_injection.rb</h1>
<div style="text-align:right;">
- Last version: <a href="http://rubyforge.org/projects/fault_injection" class="numbers">0.0.1</a>
+ Last version: <a href="http://rubyforge.org/projects/fault_injection" class="numbers">0.0.2</a>
</div>
<h2>Overview</h2>
<h3>What is it?</h3>
@@ -47,19 +29,33 @@
<h3>What is a ‘fault injection’? What is it used for?</h3>
<p>Fault injection is one of testing techniques.
-It makes easier to test your application’s error handling behavior or
+It makes it easier to test your application’s error handling behavior or
to improve the coverage of your tests.</p>
<p>See <a herf="http://en.wikipedia.org/wiki/Fault_injection">
http://en.wikipedia.org/wiki/Fault_injection
</a> for more details.</p>
+ <h3>What can I do with fault_injection.rb ?</h3>
+
+
+ <p>You can raise error at any line of code or particular method call without
+changing the target code.</p>
+
+
+ <h3>Cat it be used with Ruby on Rails testing?</h3>
+
+
+ <p>It should, but it’s not yet tested well with big applications.
+Please try and feel free to send me a bug report.</p>
+
+
<h3>Can I use it in my application code?</h3>
<p>No. It is for your testing code.</p>
@@ -70,10 +66,14 @@
<p>You should not. It is for some limited situation that rarely
happen or difficult to set up (ex. IOError).
If you can make ‘evil situation’ easily, that’s better ;)</p>
+ <p>In addition, fault_injection.rb uses set_trace_func <span class="caps">API</span> of ruby and
+it makes a script much slower.</p>
+
+
<h2>Installing</h2>
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">faultinjection</span></pre></p>
@@ -93,10 +93,11 @@
<span class="number">10</span> <span class="punct">/</span> <span class="number">2</span> <span class="comment"># this is line 7</span>
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="comment"># test.rb</span>
+<span class="ident">require</span> <span class="punct">'</span><span class="string">rubygems</span><span class="punct">'</span>
<span class="ident">require</span> <span class="punct">'</span><span class="string">fault_injection</span><span class="punct">'</span>
<span class="ident">include</span> <span class="constant">FaultInjection</span>
<span class="ident">inject</span> <span class="punct">"</span><span class="string">Foo#foo > Kernel#puts</span><span class="punct">",</span> <span class="constant">IOError</span><span class="punct">,</span> <span class="punct">"</span><span class="string">IO error</span><span class="punct">"</span>
@@ -125,10 +126,10 @@
<p>Comments are welcome. Feel free to Send an email to keisukefukuda.spam@gmail.com</p>
<p>(Please remove ”.spam” from the address for anti-spam, and include ‘ruby’ or ‘fault_injection’ in the title)</p>
<p class="coda">
- <a href="keisukefukuda.spam@gmail.com">Keisuke Fukuda</a>, 11th January 2008<br>
+ <a herf="http://keisukefukuda.rubyforge.org">Keisuke Fukuda</a>, 12th January 2008<br>
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
</p>
</div>
<!-- insert site tracking codes here, like Google Urchin -->