<?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/"
		>
<channel>
	<title>Comments on: Comparing Ruby Mock Object Libraries</title>
	<atom:link href="http://www.pathf.com/blogs/2009/05/comparing-ruby-mock-object-libraries/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pathf.com/blogs/2009/05/comparing-ruby-mock-object-libraries/</link>
	<description>Running commentary about agile development, user experience design and Ajax.</description>
	<lastBuildDate>Fri, 05 Mar 2010 19:33:43 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Craig Buchek</title>
		<link>http://www.pathf.com/blogs/2009/05/comparing-ruby-mock-object-libraries/comment-page-1/#comment-6552</link>
		<dc:creator>Craig Buchek</dc:creator>
		<pubDate>Fri, 29 May 2009 21:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=2557#comment-6552</guid>
		<description>What I like about RR is that I can set the mock expectations AFTER running the test code:

  subject = Object.new
  stub(subject).foo
  subject.foo(1)
  subject.should have_received.foo(1)

Almost every other mocking system makes you set the expectation before the test runs, which is backwards from all the other (non-mock) expectations/asserts. And since you have to set them before running the test, you have to either include them in the setup for every test, or include a lot of duplication in each test. Definitely a big win for RR.</description>
		<content:encoded><![CDATA[<p>What I like about RR is that I can set the mock expectations AFTER running the test code:</p>
<p>  subject = Object.new<br />
  stub(subject).foo<br />
  subject.foo(1)<br />
  subject.should have_received.foo(1)</p>
<p>Almost every other mocking system makes you set the expectation before the test runs, which is backwards from all the other (non-mock) expectations/asserts. And since you have to set them before running the test, you have to either include them in the setup for every test, or include a lot of duplication in each test. Definitely a big win for RR.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.250 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-21 12:59:40 -->
