Paul Pladijs [mailto:ppladijs / cage.rug.ac.be] wrote:

> It's great to have a new testing framework, especially for Ruby. It's
> the first time I'm using such a framework (shame on me). I used to
> build my own testprograms but these days are probably over. Thanks
> for building this framework.

You're welcome! Hope it makes your life easier.


> I've got a few questions:
>
> * In the method assertInstanceOf(klass, object, message="") the first
>   parameter is klass and the second one is object. IMO it's more
>   natural to switch those two, according to the English sentence:
>   "that object is an instance of this klass".

Hmmm... I agree. It also puts it in agreement with assertKindOf(). I'll fix
it.


> * The code below produces the following output:
>
>
>   Loaded suite ExperimentWithLapidary
>   Started...
>   ...
>   Finished in 0.01 seconds.
>   1 runs, 2 assertions, 0 failures, 0 errors
>          ^^^
>
>   It says there are two assertions, but I only count one in
>   the code. Perhaps this might be a bug. Reason for this
>   is probably due to the fact that the method assertBlock is
>   called twice (and addSuccessfulAssertion is called twice).
>   [in the file Assertions.rb at the lines 36, 37 and 38]

<snip code>

Before acually asserting that the given value is true, assert() does a check
to make sure that it is not called with a block, which IIRC I did because I
kept mixing up assert() and assertBlock(). Calling

	assert(message) { block }

will run, but does not do what you want it to. So, there are indeed two
assertions being run; they just happen to be caused by your invoking the one
assertion.

This brings up a bigger issue with the whole assertion counting thing. I
don't believe you'll find it in any of the various xunits; our Java team
added it to junit largely as a novelty, and we enjoy watching the number go
up. I see it as a fun metric to watch, thus I added it to Lapidary, but I've
never viewed it as a hard benchmark, so it hasn't concerned me personally
that the count is only approximately equal to the actual number of
assertions in my code.

Now that I've said that, it does seem to violate POLS, so I'll look at
fixing it. My main concern is to keep Assertions as simple as possible, but
perhaps that won't be too hard.


> * The names of the directories and source files start with
>   a capital letter. According to all the other ruby packages,
>   I would suggest it might better to change that. I'm using
>   ruby on a Windows machine, so I have no problem with mixing
>   up small and capital letters but this might be a problem
>   on Linux or other platforms.

Hmmm... the various Unixes enforce capitalization (Readme and README and
readme are all different files), while Windows does not; this shouldn't
cause any problems as long as Windows users don't get lazy and specify
things in all lowercase. Is all lowercase a 'standard' for extension
directories, or does anyone care? I will definitely leave the file names as
they are (I like them to directly correspond to the class they contain), but
I could be persuaded to change the directory names. I'm not inclined to
right now, though.

Thanks for the feedback,


Nathaniel

<:((><
+ - -						+ - -
| RoleModel Software, Inc. &		| EQUIP VI
| The XP Software Studio(TM)		|