remove vestigial _is_scalar_ref sub
[gitmo/Role-Tiny.git] / t / role-tiny.t
index b3ee22f..ebd7b8e 100644 (file)
@@ -19,6 +19,10 @@ BEGIN {
 BEGIN {
   package MyClass;
 
+  use constant SIMPLE => 'simple';
+  use constant REF_CONST => [ 'ref_const' ];
+  use constant VSTRING_CONST => v1;
+
   sub req1 { }
   sub req2 { }
   sub foo { 'class foo' }
@@ -51,7 +55,7 @@ BEGIN {
 
 sub try_apply_to {
   my $to = shift;
-  exception { Role::Tiny->apply_role_to_package('MyRole', $to) }
+  exception { Role::Tiny->apply_role_to_package($to, 'MyRole') }
 }
 
 is(try_apply_to('MyClass'), undef, 'role applies cleanly');
@@ -65,8 +69,8 @@ like(try_apply_to('NoMethods'), qr/req1, req2/, 'error for both methods');
 like(try_apply_to('OneMethod'), qr/req2/, 'error for one method');
 
 is exception {
-  Role::Tiny->apply_role_to_package('MyRole', 'IntermediaryRole');
-  Role::Tiny->apply_role_to_package('IntermediaryRole', 'ExtraClass');
+  Role::Tiny->apply_role_to_package('IntermediaryRole', 'MyRole');
+  Role::Tiny->apply_role_to_package('ExtraClass', 'IntermediaryRole');
 }, undef, 'No errors applying roles';
 
 ok(ExtraClass->does('MyRole'), 'ExtraClass does MyRole');