From: Robert Dober Date: 2009-04-04T05:02:14+09:00 Subject: [Ann] Verify, a very basic testing tool. Hi List The Verify tool is a KISS verification and test tool, it is inspired by Ara T. Howard's testy.rb. Ara however has still implemented a BDD framework, the purpose of Verify is to provide a Ruby Programmer with a very simple yet effective tool to test her assumptions about code. Verify was motivated by a reply to Ara's release post made by Phlip. Phlip has made an excellent point about assert. And that very often that is (almost?) all what is needed. The Verify tool tries to implement exactly that idea and is the simplest possible tool to do the job (for me). Verify has the following goals * Almost nothing to learn, one wrapper method and three test methods with almost no parameters all save one optional. # At the end a resume of the verifications with an error message for each failed verification # will be printed to stderr or a mocking object. # Strings and Arrays are fine for that purpose, as the reporter uses #<< exclusively. * No metaprogramming, no at_exit hook, execution of the verification inside a wrapper object, no global namespace pollution, except the Verify method. * Wrapper behavior inference to the testee is limited to #verify, #verify_not and #verify_exceptions. * Very simple output * "Last Line Says It All" feature "================" --> all tests ok, "***************" --> not all tests ok. USAGE EXAMPLES: require 'verify' Verify do verify do 42 end verify_not do nil end verify_exceptions NameError do abcdefghijk end end Verify "that the universe is ok" do verify "this only shows in error reports" do 1 / 0 end end LICENCE: BSD Enjoy Robert Ah yeah BTW if someone really wants to download this ;) http://rubyforge.org/frs/?group_id=3824&release_id=30476 -- There are some people who begin the Zoo at the beginning, called WAYIN, and walk as quickly as they can past every cage until they get to the one called WAYOUT, but the nicest people go straight to the animal they love the most, and stay there. ~ A.A. Milne (from Winnie-the-Pooh)