[PATCH] Test::More isa_ok function

2001-09-24 Thread Dave Rolsky
The patch below allows you to supply your own test name for the isa_ok function (I find the default insufficiently descriptive). I'd like to do the same for can_ok but I don't think that could be done without breaking backwards compatibility. -dave --- More.t~ Wed Sep 5 19:23:24 2001 +++

Re: [PATCH] Test::More isa_ok function

2001-09-28 Thread Andrew Wilson
On Mon, Sep 24, 2001 at 08:40:15PM -0400, Michael G Schwern wrote: > On Mon, Sep 24, 2001 at 06:23:58PM -0500, Dave Rolsky wrote: > > The patch below allows you to supply your own test name for the isa_ok > > function (I find the default insufficiently descriptive). I'd like to do > > the same fo

Re: [PATCH] Test::More isa_ok function

2001-09-28 Thread Michael G Schwern
On Fri, Sep 28, 2001 at 05:22:16PM +0100, Andrew Wilson wrote: > I've just written a small logging module and I want ot do this > > isa_ok($lj, "BlackStar::LumberJack", "I'm a LumberJack and I'm ok"); > > This feature is essential ;-) Reimplementing the chop() function? -- Michael G. Schw

Re: [PATCH] Test::More isa_ok function

2001-09-24 Thread Dave Rolsky
On Mon, 24 Sep 2001, Michael G Schwern wrote: > On Mon, Sep 24, 2001 at 06:23:58PM -0500, Dave Rolsky wrote: > > The patch below allows you to supply your own test name for the isa_ok > > function (I find the default insufficiently descriptive). I'd like to do > > the same for can_ok but I don't

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread Dave Rolsky
On Tue, 25 Sep 2001, Michael G Schwern wrote: > A, ok. How about this: > > my $yarrow = Bar->new; > isa_ok($yarrow, "Bar", 'yarrow'); > > > not ok 1 - yarrow->isa('bar') > # Failed test (foo.plx at line 3) > # yarrow isn't a 'Bar' That's better, I guess. But I'm

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread chromatic
In article <[EMAIL PROTECTED]>, "Dave Rolsky" <[EMAIL PROTECTED]> wrote: > On Tue, 25 Sep 2001, Michael G Schwern wrote: >> A, ok. How about this: >> >> my $yarrow = Bar->new; >> isa_ok($yarrow, "Bar", 'yarrow'); > isa_ok($foo, 'Alzabo::Foo', 'Return value from $bar->foreign_keys

Re: [PATCH] Test::More isa_ok function

2001-09-24 Thread Michael G Schwern
On Mon, Sep 24, 2001 at 06:23:58PM -0500, Dave Rolsky wrote: > The patch below allows you to supply your own test name for the isa_ok > function (I find the default insufficiently descriptive). I'd like to do > the same for can_ok but I don't think that could be done without breaking > backwards

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread Dave Rolsky
On Tue, 25 Sep 2001, chromatic wrote: > Combining the two gives us a test and a very contrived test failure output: > > isa_ok($foo, 'Alzabo::Foo', 'Return value from $bar->foreign_keys'); > > not ok 1 - $foo->isa('bar') > # Failed test (foo.plx at line 3) > # Retu

Re: [PATCH] Test::More isa_ok function

2001-09-25 Thread Michael G Schwern
On Mon, Sep 24, 2001 at 10:40:53PM -0500, Dave Rolsky wrote: > > What sort of names do you tend to throw in there? > > Just something more descriptive than what it generates by default. > Something like "Check that object X isa Blah". The key being that I want > to say _what_ object I'm checking