<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>TDD on BoochTek, LLC</title><link>https://blog.boochtek.com/categories/tdd/</link><description>Recent content in TDD on BoochTek, LLC</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 11 May 2015 23:43:05 +0000</lastBuildDate><atom:link href="https://blog.boochtek.com/categories/tdd/index.xml" rel="self" type="application/rss+xml"/><item><title>When Should We Do TDD?</title><link>https://blog.boochtek.com/posts/when-tdd/</link><pubDate>Mon, 11 May 2015 23:43:05 +0000</pubDate><guid>https://blog.boochtek.com/posts/when-tdd/</guid><description>&lt;p&gt;On a recent episode (&lt;a href="http://www.thisagilelife.com/78/"&gt;78&lt;/a&gt;) of &lt;a href="http://www.thisagilelife.com"&gt;This Agile Life&lt;/a&gt;, my fellow hosts talked about when to do Test-Driven Development (TDD). They all said that you should always do TDD &amp;mdash; at least for anything that will go into production; there&amp;rsquo;s an exception for experimenting or &amp;ldquo;spiking&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;I wasn&amp;rsquo;t on that episode, but later commented on the topic. (Episode 83 &amp;mdash; which wasn&amp;rsquo;t really all that great.) My take was slightly different. I said that you should do TDD only when the benefits outweigh the costs. Unfortunately, we usually greatly underestimate the benefits. And the costs often seem high at first, because it takes some time to get good at writing automated tests. Not to mention that both the costs and the benefits are usually hard to measure.&lt;/p&gt;</description></item><item><title>Testing Rails Validators</title><link>https://blog.boochtek.com/posts/testing-rails-validators/</link><pubDate>Sun, 26 Jan 2014 23:27:07 +0000</pubDate><guid>https://blog.boochtek.com/posts/testing-rails-validators/</guid><description>&lt;p&gt;It&amp;rsquo;s challenging to test Rails custom validators.&lt;/p&gt;
&lt;p&gt;I recently had to write a validator to require that an entered date is before or after a specified date.&lt;/p&gt;
&lt;p&gt;It didn&amp;rsquo;t seem like writing the validator would be too difficult &amp;ndash; I&amp;rsquo;ve written custom validators before, and date comparisons aren&amp;rsquo;t all that tricky. But when it came time to write the tests, I ran into several issues. And since I always try to follow TDD / test-first, I was blocked before I even began.&lt;/p&gt;</description></item></channel></rss>