<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Testing Views that Presume a Controller]]></title>
		<link>http://railsforum.com/viewtopic.php?id=164</link>
		<description><![CDATA[The most recent posts in Testing Views that Presume a Controller.]]></description>
		<lastBuildDate>Sun, 09 Jul 2006 20:32:54 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Testing Views that Presume a Controller]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=900#p900</link>
			<description><![CDATA[<p>I was leaning toward doing this, but because it&#039;s an Ajax action that depends on this info, I decided to just interrogate the controller directly. I think you&#039;re right about decoupling and I&#039;ll relook this.</p>]]></description>
			<author><![CDATA[dummy@example.com (cwd)]]></author>
			<pubDate>Sun, 09 Jul 2006 20:32:54 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=900#p900</guid>
		</item>
		<item>
			<title><![CDATA[Re: Testing Views that Presume a Controller]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=899#p899</link>
			<description><![CDATA[<p>Is it possible to have the controllers that render the view under test to set an @action_name instance variable instead of having the view callback to the controller? This would make it easier to test and would probably lead to a better decoupled design, even if you have to remember to manually set the action_name.</p><p>I agree with your goal of trying to build up a library of guidelines, extensions, etc for helping all the good tools to work well together.&nbsp; I was groping towards that in my blog, but haven&#039;t had a chance to start really synthesising stuff, or even updating it much recently.</p>]]></description>
			<author><![CDATA[dummy@example.com (NielsenE)]]></author>
			<pubDate>Sun, 09 Jul 2006 20:28:05 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=899#p899</guid>
		</item>
		<item>
			<title><![CDATA[Testing Views that Presume a Controller]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=898#p898</link>
			<description><![CDATA[<p>I&#039;m sorry to ask so many questions but I feel Test::Rails is a valuable firewall against breakage, but the methodology and documentation is hard to find. Here&#039;s the current dilemma:</p><p>I have a view that lists affiliates. Each is rendered by a partial. There is an administrative and a user view. The view, then interrogates the controller to ask for the action_name, which clues it in to what it&#039;s supposed to render, especially on Ajax searches.</p><p>Using Test::Rails to test this view, I don&#039;t have a controller. Is there some best practice for this?</p><p>By the way, I&#039;d like to write all this stuff down and post it if I can collect enough information. I think rcov, autotest and Test::Rails are great but people aren&#039;t making the kind of use of them they might if there were more nuts and bolts information available.</p><p>Thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (cwd)]]></author>
			<pubDate>Sun, 09 Jul 2006 20:05:22 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=898#p898</guid>
		</item>
	</channel>
</rss>
