On 12 Nov 2008, at 16:03, Joaquin Rivera Padron wrote:
> Matt Wynne:
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

yep, this one looks better to me
thanks Matt

Might not compile - I wrote it in my email client ;)

The looser the better with these, IMO. Just enough to catch your code being broken, not a bit more.

cheers,
Matt
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to