On Apr 30, 2:42 ¨Βν¬ Ψεξο ΓανπαξομΕσλινο ΞοςταξΗναι<xeno.campan... / gmail.com> wrote:
> I want to do something like:
>
> require 'test/unit'
>
> class TestMyStuff < Test::Unit::TestCase
>
> def mysub(x,y)
> assert_not_nil(x,"x nil")
> assert_not_nil(y,"y nil")
> assert(x == y,"messages")
> end

Call it assert_mysub().

In general, generic assertions have mundane names, such as
assert_equal, and application-specific assertions have long names that
reveal their application-specific intent. Such as assert_x_and_y.

Next, all tests use the pattern Assemble, Activate, Assert, but your
test case might be missing its Activate line. The line that actually
does something important, in your production code! That pattern is,
generally, why I always call the assembly methods "assemble_", and I
always call assertions "assert_".

And, as always, props for writing developer tests. You are now among
the top 5% of all programmers. (More's the pity!;)

--
  Phlip
  http://c2.com/cgi/wiki?ZeekLand