chadadavis / sbglib

Automatically exported from code.google.com/p/sbglib
0 stars 0 forks source link

Use lexical scopes in tests #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Test::Class or Test::Unit 

and Devel::Cover 

Original issue reported on code.google.com by chad.a.davis@gmail.com on 15 May 2010 at 1:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Will allow us to abort when database connection, e.g. doesn't succeed.

Also will cause a test to die, meaning that subsequent tests in the same test 
method also fail, rather than having to worry about incorrect errors from later 
tests.

Original comment by chad.a.davis@gmail.com on 17 Jul 2010 at 11:15

GoogleCodeExporter commented 9 years ago

Original comment by chad.a.davis@gmail.com on 17 Feb 2011 at 9:47

GoogleCodeExporter commented 9 years ago
Start by refactoring existings tests into tighter lexical scopes. I.e rather 
than reuse global variables to create subsequent objects:

TEST0: {
my $dom = Domain->new;
}

TEST1: {
my $dom = SomethingElse->New;
}

Original comment by chad.a.davis@gmail.com on 4 Jul 2011 at 12:32

GoogleCodeExporter commented 9 years ago

Original comment by chad.a.davis@gmail.com on 3 Oct 2011 at 4:39