<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: TDD and random numbers in ruby</title>
	<atom:link href="http://silkandspinach.net/2008/02/01/tdd-and-random-numbers-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://silkandspinach.net/2008/02/01/tdd-and-random-numbers-in-ruby/</link>
	<description>development, by example</description>
	<lastBuildDate>Tue, 07 Feb 2012 05:40:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Chris Lloyd</title>
		<link>http://silkandspinach.net/2008/02/01/tdd-and-random-numbers-in-ruby/#comment-15140</link>
		<dc:creator><![CDATA[Chris Lloyd]]></dc:creator>
		<pubDate>Mon, 15 Sep 2008 00:26:57 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=804#comment-15140</guid>
		<description><![CDATA[http://chrislloyd.com.au/posts/mocking-rand

If you want to go along with the overriding Kernel#rand then have a peek at my solution. Use with caution.]]></description>
		<content:encoded><![CDATA[<p><a href="http://chrislloyd.com.au/posts/mocking-rand" rel="nofollow">http://chrislloyd.com.au/posts/mocking-rand</a></p>
<p>If you want to go along with the overriding Kernel#rand then have a peek at my solution. Use with caution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Lloyd</title>
		<link>http://silkandspinach.net/2008/02/01/tdd-and-random-numbers-in-ruby/#comment-15113</link>
		<dc:creator><![CDATA[Chris Lloyd]]></dc:creator>
		<pubDate>Fri, 05 Sep 2008 00:30:26 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.net/?p=804#comment-15113</guid>
		<description><![CDATA[I came across this recently, and a quick and dirty way of doing this is just to repeat the assertion a set amount of times. ie.

500.times do &#124;i&#124;
  rand.should_not == 2
end

Simplistic example. It&#039;s not flawless, if you are testing the actual values you have a small chance of getting a test failure, but without going too crazy it works alright.]]></description>
		<content:encoded><![CDATA[<p>I came across this recently, and a quick and dirty way of doing this is just to repeat the assertion a set amount of times. ie.</p>
<p>500.times do |i|<br />
  rand.should_not == 2<br />
end</p>
<p>Simplistic example. It&#8217;s not flawless, if you are testing the actual values you have a small chance of getting a test failure, but without going too crazy it works alright.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

