[rspec-users] Cucumber feature checking sort order of list

Peter Ehrenberg pe at dipe.de
Wed Nov 12 10:47:27 EST 2008

2008/11/12 Joaquin Rivera Padron <joahking at gmail.com>:
>> [...]
> thanks Peter, seems I will give that a try, though I like you do not like
> very much

This is my code. Maybe it helps:

Then /the title are in alphabetic order/ do
  # FIXME: Ugly
  titles = []
  doc = Hpricot(response.body)
  (doc/"tr/td[1]/*/text()").each do |e|
    titles << e.to_s
  titles.should == titles.sort

More information about the rspec-users mailing list