Forum: Ruby on Rails I am sure I am just missing something obvious...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
238b0b3a01e0d9891c7a669a468fa84d?d=identicon&s=25 bearblu (Guest)
on 2009-01-19 21:21
(Received via mailing list)
I have html I am trying to verify that looks like:

<p>\n    Displaying <b>1</b> user\n  </p>

a test that contains

assert_tag "p",:content => /Displaying 1 user/


The assertion fails, is there something I am missing? It seems it
should match 'cause I assue the bold tag is ignored? If I change the
assertion to

assert_tag "p", :content => /Displaying 1*/

it passes.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-01-19 22:15
(Received via mailing list)
On 19 Jan 2009, at 20:20, bearblu wrote:

> The assertion fails, is there something I am missing? It seems it
> should match 'cause I assue the bold tag is ignored?
it isn't

> If I change the
> assertion to
>
> assert_tag "p", :content => /Displaying 1*/
>
that's because that will match "Displaying "

Fred
This topic is locked and can not be replied to.