<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
[Rails plugin 1.0.5]<br><br><br></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Hi,<br>I am looking for some guidance.<br></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
When working on a partial which looks like this<br><br>&nbsp;&nbsp;&nbsp; &lt;div class=&quot;bug&quot; style=&quot;width: 100%;&quot; /&gt;<br><br>I have some examples which should fail - I think - but do not:<br><br>&nbsp; &nbsp;&nbsp; it&nbsp;&nbsp; &#39; should fail&#39; do
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response.should have_tag( &#39;div.bug&#39;, :content =&gt; &#39;There is no content!&#39; )<br>&nbsp;&nbsp;&nbsp;&nbsp; end<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; it &#39; should fail since there is no bug attribute with a value of &quot;here&quot;&#39; do
<br>&nbsp; &nbsp;&nbsp; &nbsp; response.should have_tag( &#39;div&#39;, :attributes =&gt; {:bug =&gt; &quot;here&quot;} )<br>&nbsp; &nbsp; &nbsp;&nbsp; response.should have_tag( &#39;div&#39;, :attributes =&gt; {:bug =&gt; &quot;here&quot;, :another_bug =&gt; &#39;there&#39;} )
<br> &nbsp;&nbsp;&nbsp;&nbsp; end<br><br>I am calling render :partial =&gt; &#39;/bug/div&#39; in the before :each block.<br><br>As I said I would expect this to fail but it does not.<br><br>I am trying this because in the<br><br>&nbsp;&nbsp;&nbsp; &lt;my_app&gt;/vendor/plugins/rspec_on_rails/spec/rails/dsl/view_spec_spec.rb
<br><br>file there is an example<br><br>&nbsp; describe &quot;A view that includes a partial using :collection and :spacer_template&quot;, :behaviour_type =&gt; :view &nbsp;do<br><br>&nbsp;&nbsp;&nbsp; before(:each) do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; render &quot;view_spec/partial_collection_including_template&quot;
<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp;&nbsp; <br>&nbsp; &nbsp; it &quot;should render the partial w/ spacer_tamplate&quot; do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response.should have_tag(&#39;div&#39;, :content =&gt; &#39;Alice&#39;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response.should have_tag(&#39;hr&#39;, :attributes =&gt;{:id =&gt; &quot;spacer&quot;})
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; response.should have_tag(&#39;div&#39;, :content =&gt; &#39;Bob&#39;)<br>&nbsp;&nbsp;&nbsp; end<br><br>&nbsp; end<br><br>which does just this.<br><br>Can anyone help please ?<br><br>Cheers!<br>sinclair<br><br></span>