[Ruby] matching spaces as \s+ in assert_select

Laurel Fan laurel.fan at gmail.com
Wed Dec 5 10:52:47 PST 2007


Is there a nicer way to do this:

    assert_select 'h3', Regexp.new("Wants to do 1 thing".gsub!(/\s+/, '\s+'))

(basically I want to pretend to be a browser and have any whitespace
in my string match any whitespace in the text)

-- 
Laurel Fan
http://blog.gorgorg.org


More information about the Ruby mailing list