<?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; Rails</title>
	<atom:link href="http://liangzan.net/index.php/tag/rails/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>Test for blank elements with Culerity-Cucumber</title>
		<link>http://liangzan.net/index.php/2010/04/07/test-for-blank-elements-with-culerity-cucumber/</link>
		<comments>http://liangzan.net/index.php/2010/04/07/test-for-blank-elements-with-culerity-cucumber/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 07:13:30 +0000</pubDate>
		<dc:creator>zan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[cucumber culerity rails]]></category>

		<guid isPermaLink="false">http://liangzan.net/?p=69</guid>
		<description><![CDATA[How to test for blank elements when using culerity]]></description>
			<content:encoded><![CDATA[<p>When you need to test for blank elements on Culerity, it is better to parse the html. Using Celerity helper methods such as $browser.button will return a Culerity::RemoteObjectProxy object. It does not tell you if it found an element or not. It is a limitation of Culerity. To work around it try this:</p>
<p><script src="http://gist.github.com/358616.js"></script></p>
<p>You can use the above code in the step definitions. </p>
]]></content:encoded>
			<wfw:commentRss>http://liangzan.net/index.php/2010/04/07/test-for-blank-elements-with-culerity-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to shoot yourself in the foot using a functional programming language</title>
		<link>http://liangzan.net/index.php/2010/03/09/how-to-shoot-yourself-in-the-foot-using-a-functional-programming-language/</link>
		<comments>http://liangzan.net/index.php/2010/03/09/how-to-shoot-yourself-in-the-foot-using-a-functional-programming-language/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 03:46:31 +0000</pubDate>
		<dc:creator>zan</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://liangzan.net/?p=64</guid>
		<description><![CDATA[While preparing for a presentation on Scala, I added some jokes on the functional languages. Here&#8217;s the original version and the new editions Erlang You create a dozen clones of youself, pass the gun to one another in turn to shoot at each other&#8217;s foot Python You have to align your foot 10 steps below [...]]]></description>
			<content:encoded><![CDATA[<p>While preparing for a presentation on Scala, I added some jokes on the functional languages. Here&#8217;s the <a href="http://www.thealmightyguru.com/Humor/Docs/ShootYourselfInTheFoot.html">original</a> version and the new editions</p>
<p><strong>Erlang</strong><br />
You create a dozen clones of youself, pass the gun to one another in turn to shoot at each other&#8217;s foot</p>
<p><strong>Python</strong><br />
You have to align your foot 10 steps below the gun for it to work</p>
<p><strong>Ruby</strong><br />
You pull the trigger to find popcorns popping out of the gun. Someone somewhere has just made all guns shoot popcorns.</p>
<p><strong>Haskell</strong><br />
Close your eyes and picture a gun in your mind. Think about the foot being shot. Open your eyes. You found your foot shot. No sound. No smell. No one else even noticed.</p>
<p><strong>Scala</strong><br />
You pull the trigger and you got shot. You stab your foot with the gun and you got shot.</p>
]]></content:encoded>
			<wfw:commentRss>http://liangzan.net/index.php/2010/03/09/how-to-shoot-yourself-in-the-foot-using-a-functional-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selectively load Ruby Facets modules</title>
		<link>http://liangzan.net/index.php/2010/01/12/selectively-load-ruby-facets-modules/</link>
		<comments>http://liangzan.net/index.php/2010/01/12/selectively-load-ruby-facets-modules/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 09:43:39 +0000</pubDate>
		<dc:creator>zan</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://liangzan.net/?p=62</guid>
		<description><![CDATA[Ruby facets has a lot of useful libraries. Sometimes you only want to load the ones that you need. Here&#8217;s a little snippet that you can use Rails won&#8217;t load facets as the &#8216;lib&#8217; param is false. We then load the libraries manually through initializers. This helps when facets unwittingly clobbers some of the other [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby <a href="http://facets.rubyforge.org/">facets</a> has a lot of useful libraries. Sometimes you only want to load the ones that you need. Here&#8217;s a little snippet that you can use</p>
<p><script src="http://gist.github.com/275055.js"></script></p>
<p>Rails won&#8217;t load <a href="http://facets.rubyforge.org/">facets</a> as the &#8216;lib&#8217; param is false. We then load the libraries manually through initializers. This helps when <a href="http://facets.rubyforge.org/">facets</a> unwittingly clobbers some of the other gems you are using.</p>
]]></content:encoded>
			<wfw:commentRss>http://liangzan.net/index.php/2010/01/12/selectively-load-ruby-facets-modules/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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>
