<?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: Making Ruby Bacon play with Mocha</title>
	<atom:link href="http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/feed/" rel="self" type="application/rss+xml" />
	<link>http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/</link>
	<description>On Ruby, Rails, Concurrency and fiction</description>
	<lastBuildDate>Tue, 13 Sep 2011 22:17:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Zubin</title>
		<link>http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/#comment-3545</link>
		<dc:creator>Zubin</dc:creator>
		<pubDate>Sun, 11 Apr 2010 02:44:01 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/#comment-3545</guid>
		<description>Would something like this work?

# spec_helper.rb
before(:each) { mocha_setup }
after(:each) { mocha_verify; mocha_teardown }

No sure if it would work, but I generally prefer this approach over redefining methods.</description>
		<content:encoded><![CDATA[<p>Would something like this work?</p>
<p># spec_helper.rb<br />
before(:each) { mocha_setup }<br />
after(:each) { mocha_verify; mocha_teardown }</p>
<p>No sure if it would work, but I generally prefer this approach over redefining methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/#comment-2368</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Tue, 12 Aug 2008 11:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/#comment-2368</guid>
		<description>The above script could be improved slightly: as it stands, any mocha errors won&#039;t cause the Bacon test to fail; they&#039;ll just dump the errors to stdout.

You could refactor it to the following, which avoids this issue:


class Bacon::Context
  include Mocha::Standalone
  def it_with_mocha description
    it_without_mocha description do
      mocha_setup
      yield
      mocha_verify
      mocha_teardown
    end
  end
  alias_method_chain :it, :mocha
end
</description>
		<content:encoded><![CDATA[<p>The above script could be improved slightly: as it stands, any mocha errors won&#8217;t cause the Bacon test to fail; they&#8217;ll just dump the errors to stdout.</p>
<p>You could refactor it to the following, which avoids this issue:</p>
<p>class Bacon::Context<br />
  include Mocha::Standalone<br />
  def it_with_mocha description<br />
    it_without_mocha description do<br />
      mocha_setup<br />
      yield<br />
      mocha_verify<br />
      mocha_teardown<br />
    end<br />
  end<br />
  alias_method_chain :it, :mocha<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/#comment-2367</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Tue, 12 Aug 2008 11:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://gnufied.org/2008/06/12/making-ruby-bacon-play-with-mocha/#comment-2367</guid>
		<description>Thanks very much.

You should try and get this merged into Mocha :-)</description>
		<content:encoded><![CDATA[<p>Thanks very much.</p>
<p>You should try and get this merged into Mocha <img src='http://gnufied.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

