[Rt-commit] rt branch, 4.2/test-web-done-testing, created. rt-4.2.12-52-g245358f

Dustin Graves dustin at bestpractical.com
Mon Sep 28 13:24:52 EDT 2015


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

- Log -----------------------------------------------------------------
commit 245358f0be031d3d4e5bbdd0bffa3d4c70315fe6
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;
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index a383889..9303223 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -270,4 +270,5 @@ diag 'retain values when adding attachments';
         "2015-12-16", "txn date value still on form" );
 }
 
+undef $m;
 done_testing;

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


More information about the rt-commit mailing list