<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Wood for the Trees: MicroTest 1.3 / MicroStub 1.1: still under 4KB</title>
    <link>http://www.mathewabonyi.com/articles/2007/01/24/microtest-13-microstub-11-still-under-4kb</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>struggling to dig life</description>
    <item>
      <title>MicroTest 1.3 / MicroStub 1.1: still under 4KB</title>
      <description>&lt;p&gt;MicroTest has had a few tweaks, making it more brief and efficient at what it does. Also, I added a setup and teardown interface which can be used. For example, I removed the use of ObjectSpace and squeezed a few percent of performance just from that. On my 1.83GHz, the 6 tests of the self test now consistently take around 500 microseconds (or 0.0005 seconds). Pretty nippy.&lt;/p&gt;


	&lt;p&gt;MicroStub had a little problem with it&amp;#8212;it stubbed instance methods and didn&amp;#8217;t return the class back to normal. So, it violated one of the most basic principles of testing: isolated tests. That&amp;#8217;s all fixed now, using some Spartan back-and-forth aliasing. Obviously a double stub will fail. Maybe I&amp;#8217;ll fix that later.&lt;/p&gt;


	&lt;p&gt;Lastly, I added a benchmarking test case, really just useful for profiling.&lt;/p&gt;


	&lt;p&gt;Of course, the library is still under 4KB&amp;#8212;in fact, it&amp;#8217;s 3940 bytes.&lt;/p&gt;


	&lt;p&gt;Have a look at the repository (revision 25) for the latest version.&lt;/p&gt;</description>
      <pubDate>Wed, 24 Jan 2007 01:33:07 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:1eeb80a3-b7ea-43e9-84f0-ea262ea36d2a</guid>
      <author>Mathew Abonyi</author>
      <link>http://www.mathewabonyi.com/articles/2007/01/24/microtest-13-microstub-11-still-under-4kb</link>
      <category>Ruby</category>
      <trackback:ping>http://www.mathewabonyi.com/articles/trackback/44</trackback:ping>
    </item>
  </channel>
</rss>
