On 1/2/07, <b class="gmail_sendername">Ed Howland</b> &lt;<a href="mailto:ed.howland@gmail.com">ed.howland@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, all.<br><br>I have some controller tests in (using rspec) How do I test them with<br>Masterview?<br><br>If I try to test that the correct partial is rendered, this fails<br>because the requested file doesn&#39;t exist. (The .html is there, but not
<br>the MV generated .rthml)<br><br>Do I need to test only with Rake?</blockquote><div><br><br></div></div>I&#39;ll have to look into that Ed. I think it most likely has to do with the logic that tries to determine the mode in which MasterView is supposed to run. For instance when running in a server additional code is executed than when running other commands. 
<br><br>The work around is to switch the environment setting to generate the rhtml rather than load it directly. Then after you have generated it (either by starting a server or using the rake command do do it) then you can run all your tests normally because the rhtml will be there (along with the html). There are no issues with running this way except that your file system gets a little cluttered with these generated files, which is one of the reasons we made the feature to load the erb directly. Also if you decide to switch back to non-generated you have to manually clean up the old files. 
<br><br>So hopefully the work around will solve your immediate need while I look into a longer term fix which is a little tricky because of the reasons I mentioned. We also probably need an easy way to clean up generated files and some way to easily switch back and forth. 
<br><br>Jeff<br><br>