<?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>SameShirtEveryDay.com &#187; Testing</title>
	<atom:link href="http://sameshirteveryday.com/tag/testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://sameshirteveryday.com</link>
	<description>Personal blog of the one called Alex Gorbatchev, from Toronto, Canada.</description>
	<lastBuildDate>Wed, 30 Dec 2009 20:00:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>False positives in rcov</title>
		<link>http://sameshirteveryday.com/2009/04/18/false-positives-in-rcov/</link>
		<comments>http://sameshirteveryday.com/2009/04/18/false-positives-in-rcov/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 19:05:14 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[blocks]]></category>
		<category><![CDATA[coverage]]></category>
		<category><![CDATA[rcov]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://sameshirteveryday.com/?p=194</guid>
		<description><![CDATA[I noticed that depending on the syntax used, rcov (0.8.1.2.0 win32) can give false positives. For example, when putting blocks on the same line as methods that execute them, if the method was called and block wasn&#8217;t, the line would still be colored as &#8220;covered&#8221;. In the image above you can see that line #23 isn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-195" title="rcov_false_positives" src="http://sameshirteveryday.com/wp-content/uploads/2009/04/rcov_false_positives.png" alt="rcov_false_positives" width="800" height="195" /></p>
<p>I noticed that depending on the syntax used, rcov (0.8.1.2.0 win32) can give <strong>false positives</strong>. For example, when putting blocks on the same line as methods that execute them, if the method was called and block wasn&#8217;t, the line would still be colored as &#8220;covered&#8221;.</p>
<p>In the image above you can see that line #23 isn&#8217;t covered, where as #28 is. Problem is, I don&#8217;t have any tests yet hitting XML portion.</p>
<p>What&#8217;s even more interesting is that using { } syntax on multiple lines gives false positives just the same &#8211; you have to use do/end syntax specifically. Only, and only then rcov will process the block correctly.</p>
<p>Something to keep in mind.</p>
<p><strong>Update</strong>: I have tested this on OSX and the issue is exactly the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2009/04/18/false-positives-in-rcov/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing &#8216;a&#8217; character on Windows with rspec and cucumber</title>
		<link>http://sameshirteveryday.com/2009/04/18/missing-a-character-on-windows-with-rspec-and-cucumber/</link>
		<comments>http://sameshirteveryday.com/2009/04/18/missing-a-character-on-windows-with-rspec-and-cucumber/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:21:32 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://sameshirteveryday.com/?p=190</guid>
		<description><![CDATA[Trying to get a windows rails environment going this morning I stumbled upon something interesting &#8211; all &#8216;a&#8217; characters were missing from cucumber and rspec output. This has something to do with UTF-8 encoding and there&#8217;s a ticket and wiki post on cucumber about it, but no solution that I found acceptable. Everything comes down [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-192" title="cucumber_a_characters_missing" src="http://sameshirteveryday.com/wp-content/uploads/2009/04/cucumber_a_characters_missing.png" alt="cucumber_a_characters_missing" width="800" height="127" /></p>
<p>Trying to get a windows rails environment going this morning I stumbled upon something interesting &#8211; all &#8216;a&#8217; characters were missing from cucumber and rspec output.</p>
<p>This has something to do with UTF-8 encoding and there&#8217;s a <a href="https://rspec.lighthouseapp.com/projects/16211/tickets/81-windows-all-the-a-characters-in-the-output-have-gone-on-strike">ticket</a> and <a href="http://wiki.github.com/aslakhellesoy/cucumber/troubleshooting">wiki post</a> on cucumber about it, but no solution that I found acceptable.</p>
<p>Everything comes down to having change encoding in the current cmd window. This is achieved via a simple call to <code>chcp 1252</code>, but nobody want&#8217;s to do this every time, right?</p>
<p>To get this executed automaticaly and without resorting to serious registry editing, simply add this line to your <code>cucmber.bat</code> and any other batch files that are exhibiting this problem. You can find <code>cucumber.bat</code> in your <code>/ruby/bin</code> folder.</p>
<p>Here&#8217;s what it looks like:</p>
<pre>chcp 1252
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "c:/ruby/bin/cucumber" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*</pre>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2009/04/18/missing-a-character-on-windows-with-rspec-and-cucumber/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

