<?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>Zan's Collection of anything useful &#187; cucumber</title>
	<atom:link href="http://liangzan.net/index.php/tag/cucumber/feed/" rel="self" type="application/rss+xml" />
	<link>http://liangzan.net</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 10:27:56 +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>Using Cucumber to test Paperclip file attachments</title>
		<link>http://liangzan.net/index.php/2009/08/31/using-cucumber-to-test-paperclip-file-attachments/</link>
		<comments>http://liangzan.net/index.php/2009/08/31/using-cucumber-to-test-paperclip-file-attachments/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 15:23:45 +0000</pubDate>
		<dc:creator>zan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://liangzan.net/?p=51</guid>
		<description><![CDATA[I was using thoughtbot&#8217;s paperclip to attach files. I realised that paperclip only provide shoulda macros for test::unit. No cucumber macros? In the end, I got to write it. Its very simple. The feature is shown here: Define your steps: As celerity does not have an attach_file method, I got to write my own. You [...]]]></description>
			<content:encoded><![CDATA[<p>I was using thoughtbot&#8217;s <a href="http://github.com/thoughtbot/paperclip/tree/master">paperclip</a> to attach files. I realised that paperclip only provide <a href="http://github.com/thoughtbot/shoulda/tree/master">shoulda</a> macros for test::unit. No <a href="https://github.com/aslakhellesoy/cucumber/tree">cucumber</a> macros? In the end, I got to write it. Its very simple.</p>
<p>The feature is shown here: <script src="http://gist.github.com/178507.js"></script></p>
<p>Define your steps:  <script src="http://gist.github.com/178505.js"></script></p>
<p>As <a href="https://github.com/jarib/celerity/tree">celerity</a> does not have an <strong>attach_file</strong> method, I got to write my own. You could see it&#8217;s not hard at all. Remember to define the <strong>browser</strong> variable.</p>
<p>Last, we have some hooks to clean up the test upload files. Remember to place an <strong>@upload</strong> tag in your scenario.</p>
<p><script src="http://gist.github.com/178501.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://liangzan.net/index.php/2009/08/31/using-cucumber-to-test-paperclip-file-attachments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
