# The bug happened when DEMOLISHALL called
# Class::MOP::class_of($object) and did not get a metaclass object
# back.
-ok ! exception { $object->DESTROY },
-'can call DESTROY on an object without a metaclass object in the CMOP cache';
+is( exception { $object->DESTROY }, undef, 'can call DESTROY on an object without a metaclass object in the CMOP cache' );
MyClass->meta->make_immutable;
# The bug didn't manifest for immutable objects, but this test should
# help us prevent it happening in the future.
-ok ! exception { $object->DESTROY },
-'can call DESTROY on an object without a metaclass object in the CMOP cache (immutable version)';
+is( exception { $object->DESTROY }, undef, 'can call DESTROY on an object without a metaclass object in the CMOP cache (immutable version)' );
done_testing;