browser.text.include? returns a boolean value (actually truetype or falsetype, but this is not the time for this discussion), so its negation inverts your search.
do_a_faily_thing if not browser.text.include? "badgers are eating my face"
Feel free to customize for your needs. PS. This is basically the answer, only with carnal badgers.
Added for historical interest, from Chuck's suggestion:
do_a_faily_thing unless browser.text.include? "face-eating-badger-eating-badgers are eating my face-eating badgers"
Added "else" example:
if browser.text.include? "badgers are eating my face" do_a_thing else phew_no_badgers end
source share