From: Christian Neukirchen Date: 2006-10-04T06:03:29+09:00 Subject: Re: [ANN] test/spec 0.1, a BDD interface for Test::Unit "Rob Sanheim" writes: > On 9/29/06, Christian Neukirchen wrote: >> Hello, > [snip] >> You can use assert_* freely in specify-blocks; Object#should works in >> Test::Unit test cases, too, but doesn't increase the assertion count. > [/snip] >> Happy hacking and have a nice day, >> Christian Neukirchen >> >> 9861cf92ec39cce7a5e96504f1fdb6f0 testspec-0.1.0.tar.gz >> -- >> Christian Neukirchen http://chneukirchen.org > > > Looks very interesting. > > Is there a reason that calls to "should" don't increase the assertion > count? Seeing as they are sort of equivalent, and seeing the > assertion count is a helpful thing, it would be nice. Or maybe there > should be a general "verification count" that includes calls to > should? > > Here is one hack to do the assertion counts, btw: > http://www.io.com/~wazmo/blog/archives/2006_05.html#000238 This hack is done by the context/specify blocks, inside them, #shoulds are counted. However, I didn't want to monkeypatch Test::Unit directly, so #shoulds in "ordinary" Test::Unit test_* method won't be counted. Since you usually want to use context/specify blocks, this is not a problem in practice. > - rob -- Christian Neukirchen http://chneukirchen.org