<?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>Crazy Or Genius?: Tag rSpec</title>
    <link>http://www.crazyorgenius.com/articles/tag/rspec?tag=rspec</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>When You Are Right 90% Of The Time, Why Quible Over The Remaining 3%?</description>
    <item>
      <title>Behaviour Driven Development And rSpec</title>
      <description>&lt;p&gt;Last week, &lt;a href="http://www.daveastels.com"&gt;Dave Astels&lt;/a&gt; came into Halifax and gave a talk on Behaviour Driven Development (BDD) and rSpec (a &lt;span class="caps"&gt;BDD&lt;/span&gt; framework for Ruby). I thought it was quite the interesting talk, and that a lot of things seemed to make sense.&lt;/p&gt;


	&lt;p&gt;I took some rough notes, and thought I would write a bit about what I managed to take away from the talk.&lt;/p&gt;&lt;p&gt;The premise behind &lt;span class="caps"&gt;BDD&lt;/span&gt; (as I understand it) is that many users are only getting part way up the Test Driven Development ladder and then getting stuck and not being able to leverage the full set of tools and techniques they have at their disposal. Some of this has to do with terminology (ala the &lt;a href="http://en.wikipedia.org/wiki/Sapir-Whorf_and_programming_languages"&gt;Sapir-Whorf hypothesis&lt;/a&gt;) and not being able to grasp the concepts as they are presented. For example, &lt;span class="caps"&gt;TDD&lt;/span&gt; has unit tests, but what exactly is a unit? What exactly are tests supposed to test?&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;TDD&lt;/span&gt; emphasizes checking state at various points in execution. &lt;span class="caps"&gt;BDD&lt;/span&gt;, as the name would imply, defines tests in terms of behaviour.&lt;/p&gt;


	&lt;p&gt;The part of the talk that I enjoyed most was the fact that &lt;span class="caps"&gt;BDD&lt;/span&gt; focuses on human readability. So instead of something like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;def test_truth
  assert_kind_of Group,  @group
end&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;you get:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;specify &amp;quot;is really a group&amp;quot; do
  @group.should_be_an_instance_of Group
end&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Note: the above examples are identical in functionality (in fact, Dave pointed out that they made a point to provide all the same functionality as the Ruby &lt;span class="caps"&gt;TDD&lt;/span&gt; framework, so people that preferred &lt;span class="caps"&gt;BDD&lt;/span&gt; would have a clear migration path) but differ in how they are presented.&lt;/p&gt;


	&lt;p&gt;If you are interested in a more in depth description, you can check out an &lt;a href="http://"&gt;earlier version of the talk on Google Video&lt;/a&gt; 
video.google.com/videoplay?docid=8135690990081075324 or check out &lt;a href="http://www.daveastels.com"&gt;Dave&amp;#8217;s site&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 24 Oct 2006 03:52:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:fa0fa111-af10-481b-be48-d1306c83fc79</guid>
      <author>Sean</author>
      <link>http://www.crazyorgenius.com/articles/2006/10/24/behaviour-driven-development-and-rspec</link>
      <category>Ideas</category>
      <category>rSpec</category>
      <category>BDD</category>
      <category>ruby</category>
      <trackback:ping>http://www.crazyorgenius.com/articles/trackback/205</trackback:ping>
    </item>
  </channel>
</rss>
