<?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>Hank Beaver &#187; Rspec</title>
	<atom:link href="http://www.hankbeaver.com/index.php/category/rspec/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hankbeaver.com</link>
	<description>Ruby, open-source, Internet technologist located in Atlanta, GA, USA</description>
	<lastBuildDate>Tue, 29 Jun 2010 05:34:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Beware asserting against Rspec @params</title>
		<link>http://www.hankbeaver.com/index.php/2009/10/01/beware-ye-rspec-ers-params/</link>
		<comments>http://www.hankbeaver.com/index.php/2009/10/01/beware-ye-rspec-ers-params/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 12:40:43 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[Rspec]]></category>

		<guid isPermaLink="false">http://www.rubyslacker.com/?p=111</guid>
		<description><![CDATA[Spent a little time scratching my head on this week. @params is reserved in Rspec controller tests apparently much like Rails. @params will contain extra keys like &#8220;controller&#8221; and &#8220;action&#8221; which if you try and assert against will fail of you do something like this:
&#60;pre&#62;
@params = {:id =&#62; &#8216;niceid&#8217;}
&#8230;
Model.expects(:method).with(@params)
&#60;/pre&#62;
]]></description>
			<content:encoded><![CDATA[<p>Spent a little time scratching my head on this week. @params is reserved in Rspec controller tests apparently much like Rails. @params will contain extra keys like &#8220;controller&#8221; and &#8220;action&#8221; which if you try and assert against will fail of you do something like this:</p>
<p>&lt;pre&gt;</p>
<p>@params = {:id =&gt; &#8216;niceid&#8217;}<br />
&#8230;<br />
Model.expects(:method).with(@params)</p>
<p>&lt;/pre&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2009/10/01/beware-ye-rspec-ers-params/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using gem dependencies with Rspec == BAD ! !</title>
		<link>http://www.hankbeaver.com/index.php/2008/11/17/using-gem-dependencies-with-rspec-bad/</link>
		<comments>http://www.hankbeaver.com/index.php/2008/11/17/using-gem-dependencies-with-rspec-bad/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 17:29:42 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rspec]]></category>
		<category><![CDATA[exceptions]]></category>
		<category><![CDATA[gems]]></category>

		<guid isPermaLink="false">http://1000fires.com/wordpress/?p=51</guid>
		<description><![CDATA[We had an issue the last couple of weeks on a new Rails project we started here at my gig. All Rails exceptions were quietly logged without showing any stack trace to browser. This was very annoying. Secondly, the RAILS_ENV was reported as &#8220;test&#8221;. mmmm, very suspicious. After some investigation I found the culprit on [...]]]></description>
			<content:encoded><![CDATA[<p>We had an issue the last couple of weeks on a new Rails project we started here at my gig. All Rails exceptions were quietly logged without showing any stack trace to browser. This was very annoying. Secondly, the RAILS_ENV was reported as &#8220;test&#8221;. mmmm, very suspicious. After some investigation I found the culprit on rails.rb line #1 of rails-rspec gem installed in our vendor dir:</p>
<div class="code">silence_warnings { RAILS_ENV = &#8220;test&#8221; }</div>
<p>Take a look at this to get a little context:</p>
<p>http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies</p>
<p>How can rspec affect your actual Rails environment, script/server, script/console, script/about? I&#8217;ll show you. enter our environment.rb:</p>
<div class="code">
<p>config.gem &#8216;rspec-rails&#8217;,<br />
:version =&gt; &#8216;&gt;= 1.1.11&#8242;, :lib =&gt; &#8217;spec/rails&#8217;<br />
config.gem &#8216;rspec&#8217;,<br />
:version =&gt; &#8216;&gt;= 1.1.11&#8242;, :lib =&gt; &#8217;spec&#8217;</p>
</div>
<p>Aha! So effectively, by including our gems here too (and gaining the added benefits noted above at ryandaigle.com )rather than simply in our spec_helper, we replaced our RAILS_ENV and invoked the Rails equivalent of an exception black hole.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2008/11/17/using-gem-dependencies-with-rspec-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
