[Rails] Re: assert_select embedded in text

2009-06-15 Thread Colin Law
2009/6/14 Marnen Laibow-Koser : > > Colin Law wrote: > [...]> I found a solution to this by adding span tags round my text >> fragments, so that the html is now >> some textsome more text > [...] >> This works but feel there must be a better solution than adding extra >> tags to the html just so t

[Rails] Re: assert_select embedded in text

2009-06-14 Thread Marnen Laibow-Koser
Colin Law wrote: [...]> I found a solution to this by adding span tags round my text > fragments, so that the html is now > some textsome more text [...] > This works but feel there must be a better solution than adding extra > tags to the html just so that it can be tested. Indeed. Try using th

[Rails] Re: assert_select embedded in text

2009-06-14 Thread Colin Law
2009/6/13 Colin Law : > 2009/6/13 Marnen Laibow-Koser : >> >> 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.*]*>some more text/m ? >> > > No that doesn't work.  The br tag does not a

[Rails] Re: assert_select embedded in text

2009-06-13 Thread Colin Law
2009/6/13 Marnen Laibow-Koser : > > 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.*]*>some more text/m ? > No that doesn't work. The br tag does not appear in the text for the p tag. T

[Rails] Re: assert_select embedded in text

2009-06-13 Thread Marnen Laibow-Koser
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.*]*>some more text/m ? BTW, you shouldn't be using in the self-closing form unless you're generating XHTML (it is not actually valid HTML), and y

[Rails] Re: assert_select embedded in text

2009-06-13 Thread Colin Law
2009/6/13 Colin Law : > 2009/6/13 Marnen Laibow-Koser : >> >> Colin Law wrote: >> [...] >> } I cannot see how to check that the break is at the >>> right point in the text. >> >> What does the "right point" consist of?  In other words, how (English, >> not Ruby) would you define the break being at

[Rails] Re: assert_select embedded in text

2009-06-13 Thread Colin Law
2009/6/13 Marnen Laibow-Koser : > > Colin Law wrote: > [...] > } I cannot see how to check that the break is at the >> right point in the text. > > What does the "right point" consist of?  In other words, how (English, > not Ruby) would you define the break being at the right point? > Repeating m

[Rails] Re: assert_select embedded in text

2009-06-13 Thread Marnen Laibow-Koser
Colin Law wrote: [...] } I cannot see how to check that the break is at the > right point in the text. What does the "right point" consist of? In other words, how (English, not Ruby) would you define the break being at the right point? > > Any help will be much appreciated > > Colin Best, -