[Rt-commit] rt branch, 4.2/test-web-done-testing, created. rt-4.2.11-46-gd50aeab

Dustin Graves dustin at bestpractical.com
Tue Aug 11 12:41:17 EDT 2015


The branch, 4.2/test-web-done-testing has been created
        at  d50aeab39142cc9520cd0059069c9e1122d361ab (commit)

- Log -----------------------------------------------------------------
commit d50aeab39142cc9520cd0059069c9e1122d361ab
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Fri Aug 7 18:57:30 2015 +0000

    add helper text to explain RT::Test::Web objects must be destroyed before done_testing is called

diff --git a/lib/RT/Test/Web.pm b/lib/RT/Test/Web.pm
index 74da61c..ec59d33 100644
--- a/lib/RT/Test/Web.pm
+++ b/lib/RT/Test/Web.pm
@@ -427,6 +427,11 @@ sub dom {
 
 sub DESTROY {
     my $self = shift;
+
+    if ( RT::Test->builder->{Done_Testing} ) { 
+        die "RT::Test::Web object needs to be destroyed before done_testing is called";
+    }
+
     if ( !$RT::Test::Web::DESTROY++ ) {
         $self->no_warnings_ok;
     }
diff --git a/t/mail/dashboards.t b/t/mail/dashboards.t
index d7b1ccc..18cfd58 100644
--- a/t/mail/dashboards.t
+++ b/t/mail/dashboards.t
@@ -363,4 +363,5 @@ produces_no_dashboard_mail_ok(
     Time    => $bad_time,
 );
 
+undef $m;
 done_testing;

-----------------------------------------------------------------------


More information about the rt-commit mailing list