<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Life Of A Radar &#187; webrat</title>
	<atom:link href="http://ryanbigg.com/tag/webrat/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanbigg.com</link>
	<description>Life &#38; Everything Else</description>
	<lastBuildDate>Mon, 30 Aug 2010 11:30:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Webrat Woes</title>
		<link>http://ryanbigg.com/2009/01/webrat-woes/</link>
		<comments>http://ryanbigg.com/2009/01/webrat-woes/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 11:00:17 +0000</pubDate>
		<dc:creator>Radar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[webrat]]></category>

		<guid isPermaLink="false">http://frozenplague.net/?p=427</guid>
		<description><![CDATA[Yesterday I wrote a feature for one of the apps at work that was fairly simple it contained this line: clicks_link("I am done") The page contained a link with the text exactly as &#8220;I am done&#8221; and in all dimensions of this universe you would expect this to pass without fault. It didn&#8217;t. So when [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I wrote a feature for one of the apps at work that was fairly simple it contained this line:</p>

<pre>
  clicks_link("I am done")
</pre>

<p>The page contained a link with the text exactly as &#8220;I am done&#8221; and in all dimensions of this universe you would expect this to pass without fault. It didn&#8217;t. </p>

<p>So when this feature failed I brought Bo over and got him to look at it. We couldn&#8217;t figure it out yesterday and it took a few hours this morning to figure out what it was. The site was fairly basic, consisting of a layout that contained:</p>

<pre lang='html'>
<%= link_to "Things", thing_path %>
<%= yield %>
</pre>

<p>And the page itself consisted of a form and ended in the link:</p>

<pre lang='html'>
<%= link_to "I am done", do_something_path %>
</pre>

<p>But the bloody feature failed! So we sanity check&#8217;d it, output the response&#8217;s body and definitely saw the a tag in there. It was there! So we further checked it and tried the URL from the layout and that worked! Major WTF moment there. It took us an hour or so of further WTF before Bo said &#8220;Humour me&#8221; and gave the layout valid HTML, you know, something like this:</p>

<pre lang='html'>
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd"&gt;

&lt;html lang="en"&gt;
&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;%= link_to "Things", things_path %&gt;
  &lt;%= yield %&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>

<p>And the feature passed! So remember kids, do not be lazy! If you&#8217;re testing with webrat remember to always have a valid HTML layout on your site!</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanbigg.com/2009/01/webrat-woes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
