How about something more like
Given there are two items in a list: "Zulu and Abba"
And I have sorted the list alphabetically
Then "Abba" should appear before "Zulu"
Then /"(.*)" should appear before "(.*)"/ do |first_example,
second_example|
response.body.should =~ /#{first_example}.*#{second_example}/
end
On 12 Nov 2008, at 15:47, Peter Ehrenberg wrote:
2008/11/12 Joaquin Rivera Padron <[EMAIL PROTECTED]>:
[...]
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
end
titles.should == titles.sort
end
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users