2009/6/13 Marnen Laibow-Koser <rails-mailing-l...@andreas-s.net>: > > Colin Law wrote: > [...] >>> The right point for the break is after 'some text' and before 'some more >>> text' > > How about assert_select "p", /some text.*<br[^>]*>some more text/m ? >
No that doesn't work. The br tag does not appear in the text for the p tag. This can be seen from the fact that assert_select "p", "some textsome more text" passes. I tried it just to check and it said /some text.*<br[^>]*>some more text/m expected but was some textsome more text > BTW, you shouldn't be using <br/> in the self-closing form unless you're > generating XHTML (it is not actually valid HTML), and you shouldn't be > generating XHTML unless you're serving it with the XHTML MIME type -- at > which point IE won't understand the document! So in general, HTML 4 is > the way to go (the html_output plugin will help). See the recent thread > where Rimantas convinced me of this (admittedly after some argument from > me). OK Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---