More CDI related fail
[catagits/Catalyst-Runtime.git] / t / cdi_backcompat_plugin_accessor_override.t
index 8a91781..9b3bb0f 100644 (file)
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 use lib 't/lib';
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 use Test::Exception;
 
 # Force a stack trace.
@@ -24,9 +24,15 @@ $SIG{__DIE__} = \&Carp::confess;
     __PACKAGE__->config;
 }
 
+lives_ok {
+    CDICompatTestApp->setup;
+} 'Setup app with plugins which says use base qw/Class::Accessor::Fast/';
+
+# And the plugin's setup_finished method should have been run, as accessors
+# are not created in MyApp until the data is written to.
 TODO: {
-    local $TODO = 'The overridden setup in CDICompatTestApp + the overridden accessor causes destruction';
-    lives_ok {
-        CDICompatTestApp->setup;
-    } 'Setup app with plugins which says use base qw/Class::Accessor::Fast/';
+    local $TODO = "Copying the class data accessor down into MyApp other than at runtime\n" .
+    " when assigned (as pre exact CDI behavior) causes methods to not get run';
+    no warnings 'once';
+    is $CDICompatTestPlugin::Data::HAS_RUN_SETUP_FINISHED, 1, 'Plugin setup_finish run';
 }