On Tue, Mar 10, 2009 at 1:16 PM, Bart Zonneveld <zuperinfin...@gmail.com>wrote:
> Hey list, > > Quick question: How can I check that a given word appears a number of times > on a page? > The page in question includes some XML, rendered with <s and >s and I > want to test that a given node exists 10 times on that page. > Here are a couple of ways to do it: http://lmgtfy.com/?q=ruby+count+occurrence+words count = # one of the solutions above count.should == 10 Cheers, Aslak > > thanks! > bartz > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users