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. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2009-Jan-19 21:14 UTC
Re: I am sure I am just missing something obvious...
On 19 Jan 2009, at 20:20, bearblu wrote:> > 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?it isn''t> If I change the > assertion to > > assert_tag "p", :content => /Displaying 1*/ >that''s because that will match "Displaying " Fred> it passes. > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---