<?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"
	>
<channel>
	<title>Comments on: Firing Rails Controller Actions from Command line (console)</title>
	<atom:link href="http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/</link>
	<description>It would be a good idea.</description>
	<pubDate>Fri, 25 Jul 2008 23:46:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: science</title>
		<link>http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-1997</link>
		<dc:creator>science</dc:creator>
		<pubDate>Sun, 06 Apr 2008 06:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-1997</guid>
		<description>An interesting alternative to this technique is blogged here: http://snippets.dzone.com/posts/show/600</description>
		<content:encoded><![CDATA[<p>An interesting alternative to this technique is blogged here: <a href="http://snippets.dzone.com/posts/show/600" rel="nofollow">http://snippets.dzone.com/posts/show/600</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: science</title>
		<link>http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-446</link>
		<dc:creator>science</dc:creator>
		<pubDate>Wed, 12 Dec 2007 07:16:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-446</guid>
		<description>Word to the wise: you may get weird errors if you use this line when running integration tests (i.e. when RAILS_ENV != 'production')
&lt;pre&gt;&lt;code&gt;
require 'action_controller/integration'
&lt;/code&gt;&lt;/pre&gt;
So it's better (though fugly) to use something like:
&lt;pre&gt;&lt;code&gt;
require 'action_controller/integration' unless (RAILS_ENV != 'production')
&lt;/code&gt;&lt;/pre&gt;
Basically, from what I can tell, Rails is re-entrantly calling development mode and then test mode, for purposes of parsing rb files. So if you prevent this require statement from being called in dev or test mode, then you don't get the collision with action_controller/integration. If I knew enough about this part of Rails, I'd submit a patch - anyone with ideas - post them here!</description>
		<content:encoded><![CDATA[<p>Word to the wise: you may get weird errors if you use this line when running integration tests (i.e. when RAILS_ENV != &#8216;production&#8217;)</p>
<pre><code>
require 'action_controller/integration'
</code></pre>
<p>So it&#8217;s better (though fugly) to use something like:</p>
<pre><code>
require 'action_controller/integration' unless (RAILS_ENV != 'production')
</code></pre>
<p>Basically, from what I can tell, Rails is re-entrantly calling development mode and then test mode, for purposes of parsing rb files. So if you prevent this require statement from being called in dev or test mode, then you don&#8217;t get the collision with action_controller/integration. If I knew enough about this part of Rails, I&#8217;d submit a patch - anyone with ideas - post them here!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: olddog</title>
		<link>http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-404</link>
		<dc:creator>olddog</dc:creator>
		<pubDate>Wed, 28 Nov 2007 19:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-404</guid>
		<description>GRREAT post , exactly what I needed.</description>
		<content:encoded><![CDATA[<p>GRREAT post , exactly what I needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: science</title>
		<link>http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-219</link>
		<dc:creator>science</dc:creator>
		<pubDate>Tue, 09 Oct 2007 19:25:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.misuse.org/science/2007/07/24/firing-rails-controller-actions-from-command-line-console/#comment-219</guid>
		<description>Also noticed recently that if you want to get access to the html body of an action in a test environment (a functional test, that is), the code you could use is:

html_response = @response.body</description>
		<content:encoded><![CDATA[<p>Also noticed recently that if you want to get access to the html body of an action in a test environment (a functional test, that is), the code you could use is:</p>
<p>html_response = @response.body</p>
]]></content:encoded>
	</item>
</channel>
</rss>
