Perfect. That's really nifty. I'm also reading the comments in selector_assertions.rb in actionpack.<br><br><div><span class="gmail_quote">On 9/25/07, <b class="gmail_sendername">David Chelimsky</b> <<a href="mailto:dchelimsky@gmail.com">
dchelimsky@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 9/25/07, David James <<a href="mailto:davidj503@gmail.com">
davidj503@gmail.com</a>> wrote:<br>> I have a page that hides elements using CSS display: none.<br>><br>> I don't expect RSpec to test any changes made by Javascript; I just want to<br>> test how the page loads initially: what is visible and what is not.
<br><br>If the css is expressed in-line in the html, then you can do it like<br>so (example assumes a div with id foo that should be hidden):<br><br>response.should have_tag('div#foo[style=?]', /display:\s*none/)<br>
<br>have_tag wraps asset_select, so have a look at the assert_select docs<br>for more info</blockquote></div><br>