Re: Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread leif . eriksen
[EMAIL PROTECTED] wrote: You may wish to look at Test::Inline and Test::Class which are different approaches to putting your tests near your code. Test::Inline looks like what I'm thinking - thanx Also __TEST__ is not legal Perl which gets into source filters and then the burning and itc

Re: Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread Michael G Schwern
On Fri, Aug 12, 2005 at 10:28:36AM +1000, [EMAIL PROTECTED] wrote: > I'm thinking that the code, tests, data and pod are all there in the pm > file - that seems on the surface a good thing. Does this seem like a > reasonable idea ? > > Against it is the significant inertia the current .t regime

Embedding tests in modules (inspired by my misreading of Test::Code)

2005-08-11 Thread leif . eriksen
[EMAIL PROTECTED] wrote: I usually do this with can_ok() can_ok( __PACKAGE__, qw(is_code isnt_code) ); Initially i thought "Would that work ? Isnt __PACKAGE__ equal to main:: in a t file ?" then I realised we're testing that the use_ok is exporting these to our namespace, which