Not to be contentious, but you use both define_method and *_eval to
generate code.  Unless I don't know what that term means, I believe
you *do* use metaprogramming.

Though, I do have a question/concern/confusion/something.  I
completely and utterly fail to see the point of these new closure
obsessed frameworks or tools.  Nearly every bit of their functionality
could be wrapped up in a few simple helpers like this:

class Test::Unit::TestCase
  alias old_assert assert

  def assert(result =3D nil, &block)
    result =3D block.call if block_given?
    old_assert result
  end
end

Unless I'm totally missing something?  I realize it's a different
syntax or "DSL," and that's fine if that's your reasoning, but I don't
see how they're all that revolutionary.  I like closures as much as
the next guy, but I don't see how they revolutionize my testing life.

</rant>

Aimed much less at you, and more at the 4-5 of these I've seen in the
past few days.

--Jeremy

On Fri, Apr 3, 2009 at 3:02 PM, Robert Dober <robert.dober / gmail.com> wrote=
:
> Hi List
>
> The Verify tool is a KISS verification and test tool, it is inspired
> by Ara T. Howard's testy.rb.
> =A0Ara however has still implemented a BDD framework, the purpose of
> Verify is to provide a Ruby Programmer
> =A0with a very simple yet effective tool to test her assumptions about co=
de.
>
> =A0Verify was motivated by a reply to Ara's release post made by Phlip.
> Phlip has made an excellent point about assert.
> =A0And that very often that is (almost?) all what is needed.
> =A0The Verify tool tries to implement exactly that idea and is the
> simplest possible tool to do the job (for me).
>
> =A0Verify has the following goals
>
> =A0 * Almost nothing to learn, one wrapper method and three test
> methods with almost no parameters all save one
> =A0 =A0 optional.
> =A0 =A0 =A0# At the end a resume of the verifications with an error messa=
ge
> for each failed verification
> =A0 =A0 =A0# will be printed to stderr or a mocking object.
> =A0 =A0 =A0# Strings and Arrays are fine for that purpose, as the reporte=
r
> uses #<< exclusively.
>
>
> =A0 * No metaprogramming, no at_exit hook, execution of the
> verification inside a wrapper object, no global namespace pollution,
> =A0 =A0 except the Verify method.
>
> =A0 * Wrapper behavior inference to the testee is limited to #verify,
> #verify_not and #verify_exceptions.
>
> =A0 * Very simple output
>
> =A0 * "Last Line Says It All" feature "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D" --> all tests
> ok, "***************" --> not all tests ok.
>
> USAGE EXAMPLES:
>
> =A0 =A0 =A0 =A0require 'verify'
>
> =A0 =A0 =A0 =A0Verify do
> =A0 =A0 =A0 =A0 =A0verify do 42 end
> =A0 =A0 =A0 =A0 =A0verify_not do nil end
> =A0 =A0 =A0 =A0 =A0verify_exceptions NameError do abcdefghijk end
> =A0 =A0 =A0 =A0end
>
> =A0 =A0 =A0 =A0Verify "that the universe is ok" do
> =A0 =A0 =A0 =A0 =A0verify "this only shows in error reports" do
> =A0 =A0 =A0 =A0 =A0 =A01 / 0
> =A0 =A0 =A0 =A0 =A0end
> =A0 =A0 =A0 =A0end
>
> LICENCE:
> =A0 =A0 =A0 =A0BSD
>
> Enjoy
> Robert
>
> Ah yeah BTW if someone really wants to download this ;)
>
> http://rubyforge.org/frs/?group_id=3D3824&release_id=3D30476
>
>
> --
> 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)
>
>



--=20
http://jeremymcanally.com/
http://entp.com/
http://omgbloglol.com

My books:
http://manning.com/mcanally/
http://humblelittlerubybook.com/ (FREE!)