Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jplindstrom (594)

  (email not shown publicly)

Journal of jplindstrom (594)

Friday August 21, 2009
09:26 AM

A Test::Class idiom

[ #39503 ]
Test::Class is very nice, but I realize I've started to use it in a peculiar way that I think is an indication of a missing feature.

Let's say there's a class with quite a few different tests and I'm currently TDD-ing this single method.

sub ion_favourites : Test(no_plan) {
    # ...

It's quite annoying to run the whole test class, because all of the test methods are run, not just the one I'm working on. The output of my test is easily lost in the sea of output, and running all of the tests increase the turnaround time.

To only run this test, I temporarily rename it and put an exit at the end:

sub a__ion_favourites : Test(no_plan) {
    # ...

The naming ordering is actually mentioned in the manual, but seems to be more geared to running sanity checks first.

The full test suite fails becuase of the exit status, but I can easily see whether the stuff I'm working on passes and that's what I care about during TDD.

Smells a bit hacky, but it works. So, does anyone else do this?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.