<?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: Tag railsconf</title>
    <link>http://blog.davidchelimsky.net/articles/tag/railsconf?tag=railsconf</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>on software in process and practice</description>
    <item>
      <title>Slides from RailsConf</title>
      <description>&lt;p&gt;Here are the &lt;a href="http://blog.davidchelimsky.net/files/IntegrationTestingWithRSpecStoryRunner.RailsConf.2008.pdf"&gt;slides&lt;/a&gt; from my session at RailsConf on &lt;a href="http://en.oreilly.com/rails2008/public/schedule/detail/2055"&gt;Integration Testing With RSpec&amp;#8217;s Story Runner&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 16 Jun 2008 10:10:38 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:3cd915f1-f5d9-48e9-aa00-97c91bc3a121</guid>
      <author>David</author>
      <link>http://blog.davidchelimsky.net/articles/2008/06/16/slides-from-railsconf</link>
      <category>rspec</category>
      <category>railsconf</category>
      <category>slides</category>
    </item>
    <item>
      <title>RSpec-1.1.4</title>
      <description>&lt;p&gt;We released RSpec-1.1.4 today. It&amp;#8217;s mostly a maintenance release but there are a few of cool new features that you may want to know about and take advantage of.&lt;/p&gt;


	&lt;h3&gt;hash_including&lt;/h3&gt;


	&lt;p&gt;One thing that has always been a drag is having to specify every key/value pair in a hash that is received as an argument. This is especially painful in Rails controller examples because Rails adds some data to the hash and the examples really don&amp;#8217;t care about that extra data.&lt;/p&gt;


	&lt;p&gt;Enter &lt;code&gt;hash_including()&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;This is a mock argument matcher that let&amp;#8217;s you expect a hash including certain key/value pairs regardless of anything else that shows up in the hash. So instead of:&lt;/p&gt;


&lt;pre&gt;
account.should_receive(:deposit).with({:amount =&amp;gt; 37.42, :date =&amp;gt; anything()})
&lt;/pre&gt;

	&lt;p&gt;you can just say:&lt;/p&gt;


&lt;pre&gt;
account.should_receive(:deposit).with(hash_including(:amount =&amp;gt; 37.42))
&lt;/pre&gt;

	&lt;p&gt;and keep the example focused on what you&amp;#8217;re really interested in&lt;/p&gt;


	&lt;p&gt;Thanks to &lt;a href="http://talklikeaduck.denhaven2.com/"&gt;Rick DeNatale&lt;/a&gt; who submitted this feature request and the patch to implement it.&lt;/p&gt;


	&lt;h3&gt;The heckler returns&lt;/h3&gt;


	&lt;p&gt;RSpec wasn&amp;#8217;t correctly supporting heckle for a while but the spec-heckler is back in action. For those unfamiliar, you can read about heckle at &lt;a href="http://blog.zenspider.com/2007/06/heckle-version-141-has-been-re.html"&gt;zenspider&amp;#8217;s blog&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s how you heckle your Animal model in your PetStore app:&lt;/p&gt;


&lt;pre&gt;
spec spec/models/animal_spec.rb --heckle Animal
&lt;/pre&gt;

	&lt;p&gt;Thanks to &lt;a href="http://tarvainen.wordpress.com/"&gt;Antti Tarvainen&lt;/a&gt; for resurrecting this one.&lt;/p&gt;


	&lt;h3&gt;stub_model&lt;/h3&gt;


	&lt;p&gt;This is for rails developers who like writing view examples with &lt;code&gt;mock_model()&lt;/code&gt; but are sick and tired of having to stub every single attribute that gets referenced in a view.&lt;/p&gt;


	&lt;p&gt;Instead of creating a mock object like &lt;code&gt;mock_model()&lt;/code&gt; does, &lt;code&gt;stub_model()&lt;/code&gt; creates an instance of a real model class, but cuts off it&amp;#8217;s connection to the database, raising an error any time it tries to connect to the database.&lt;/p&gt;


	&lt;p&gt;This is inspired by projects like &lt;a href="http://www.dcmanges.com/blog/rails-unit-record-test-without-the-database"&gt;unit_record&lt;/a&gt; and &lt;a href="http://agilewebdevelopment.com/plugins/nulldb"&gt;NullDB&lt;/a&gt;, but let&amp;#8217;s you do things at a more granular level &amp;#8211; allowing you to hit the db in some cases (where you think you really need it) and not in others.&lt;/p&gt;


	&lt;p&gt;Of course, you may prefer to the sort of &amp;#8220;protection&amp;#8221; you get from those projects, which ensure that no code touches the DB at all. If you do, have at it. This is just another option for you.&lt;/p&gt;


	&lt;h3&gt;All this and more&lt;/h3&gt;


	&lt;p&gt;These are just a few of the issues addressed in 1.1.4. For more information, check out the &lt;a href="http://rspec.info/changes.html"&gt;changelog&lt;/a&gt; and &lt;a href="http://rspec.lighthouseapp.com/projects/5645"&gt;lighthouse&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 27 May 2008 01:07:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:9e423c98-ab13-4d7e-84ec-a3b8eac1620a</guid>
      <author>David</author>
      <link>http://blog.davidchelimsky.net/articles/2008/05/27/rspec-1-1-4</link>
      <category>rspec</category>
      <category>ruby</category>
      <category>railsconf</category>
    </item>
    <item>
      <title>Presenting at RailsConf 2008</title>
      <description>&lt;p&gt;I&amp;#8217;m going to be presenting at &lt;a href="http://en.oreilly.com/rails2008/public/content/home"&gt;RailsConf 2008&lt;/a&gt; on &lt;a href="http://rspec.info"&gt;RSpec&amp;#8217;s&lt;/a&gt; Story Runner. I&amp;#8217;ll be talking about how I approach writing for the Story Runner and address several related issues including:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;plain text stories vs pure Ruby (when is which appropriate?)&lt;/li&gt;
		&lt;li&gt;extending the RailsStory with custom helpers&lt;/li&gt;
		&lt;li&gt;testing forms using &lt;a href="http://agilewebdevelopment.com/plugins/webrat"&gt;webrat&lt;/a&gt; within the Story Runner&lt;/li&gt;
		&lt;li&gt;finding a balance of domain and UI scenarios&lt;/li&gt;
		&lt;li&gt;duplication between stories/scenarios and model/view/controller/helper examples&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;That&amp;#8217;s probably already more than I can cover fairly in a 45 minute presentation, but feel free to make other suggestions if you have them.&lt;/p&gt;


	&lt;p&gt;See you in Portland!&lt;/p&gt;</description>
      <pubDate>Sat, 26 Jan 2008 12:15:59 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6056951a-8987-4b51-a49b-62397ec2e1af</guid>
      <author>David</author>
      <link>http://blog.davidchelimsky.net/articles/2008/01/26/presenting-at-railsconf-2008</link>
      <category>rails</category>
      <category>ruby</category>
      <category>railsconf</category>
      <category>conferences</category>
    </item>
  </channel>
</rss>
