<?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>David Chelimsky: Lessons in Spec'ing</title>
    <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>on software in process and practice</description>
    <item>
      <title>Lessons in Spec'ing</title>
      <description>&lt;p&gt;Lesson: system calls in specs do stuff on your system. Be careful.&lt;/p&gt;


	&lt;p&gt;I was trying different things to understand why a spec was failing and, at one point, put a pending statement in a spec that generates a file and then deletes it. The statement that deletes the file is in an after(:each) block (which is guaranteed to run) and looks like this:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;system(%Q|rm "#{dir}/#{filename}"|)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Imagine my horror when I saw this in the output:&lt;/p&gt;


&lt;pre&gt;rm: /: is a directory&lt;/pre&gt;</description>
      <pubDate>Fri, 26 Oct 2007 09:30:14 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:826c3f11-ce36-452d-b5c3-14db6d6d8e8a</guid>
      <author>David</author>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing</link>
      <category>rspec</category>
    </item>
    <item>
      <title>"Lessons in Spec'ing" by Bob</title>
      <description>&lt;p&gt;I dont understand why that does not work :(&lt;/p&gt;</description>
      <pubDate>Tue, 30 Oct 2007 17:18:08 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:2df7a4da-7663-4443-a9d8-404440d040d3</guid>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing#comment-356</link>
    </item>
    <item>
      <title>"Lessons in Spec'ing" by Lance Carlson</title>
      <description>&lt;p&gt;at least it wasn&amp;#8217;t..&lt;/p&gt;


	&lt;p&gt;sudo rm -rdf /&lt;/p&gt;


	&lt;p&gt;;)&lt;/p&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:27:12 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:02bf6789-5ba4-4a8f-b4c6-9e00253eee61</guid>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing#comment-354</link>
    </item>
    <item>
      <title>"Lessons in Spec'ing" by James Hill</title>
      <description>&lt;p&gt;Luckily you weren&amp;#8217;t at the school of hard knocks that day ;-)&lt;/p&gt;</description>
      <pubDate>Sat, 27 Oct 2007 13:03:07 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:694c8348-1682-4615-8248-603c17c807d9</guid>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing#comment-352</link>
    </item>
    <item>
      <title>"Lessons in Spec'ing" by Ashley Moran</title>
      <description>&lt;p&gt;I came across this the other day, although not tried it yet: &lt;a href="http://rubyforge.org/projects/mockfs/" rel="nofollow"&gt;http://rubyforge.org/projects/mockfs/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I don&amp;#8217;t like the way you have to modify your application code to use it, but it&amp;#8217;s nice that one line of config stops real filesystem access.&lt;/p&gt;</description>
      <pubDate>Fri, 26 Oct 2007 13:19:21 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:0ef94598-1e9c-44ac-9624-d9d68aa83f36</guid>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing#comment-351</link>
    </item>
    <item>
      <title>"Lessons in Spec'ing" by krotty.korobka.net</title>
      <description>&lt;p&gt;Somebody even shipped it with File::Remove (perl):
&lt;a href="http://use.perl.org/" rel="nofollow"&gt;http://use.perl.org/&lt;/a&gt;~Alias/journal/34680&lt;/p&gt;</description>
      <pubDate>Fri, 26 Oct 2007 12:48:17 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:16274a50-357c-494d-8137-d5a75c05e87d</guid>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing#comment-350</link>
    </item>
    <item>
      <title>"Lessons in Spec'ing" by rubyruy</title>
      <description>&lt;p&gt;That is so especially scary in a oh-god-it-could-happen-to-me kind of way&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Fri, 26 Oct 2007 10:40:16 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:068105da-eaf8-46b1-adf0-8cf07a320e87</guid>
      <link>http://blog.davidchelimsky.net/articles/2007/10/26/lessons-in-specing#comment-349</link>
    </item>
  </channel>
</rss>
