When an anonymous object is created using mock_obj() and call tracking is enabled, the method call_tracking() called on the created object returns undef.
Steps to reproduce:
#!/usr/bin/env perl
use strict;
use warnings;
use Test2::Tools::Mock qw/mock_obj/;
use Data::Dumper;
my $mock = mock_obj( track => 1, add => [ do => 1 ] );
$mock->do('something');
my $track = $mock->call_tracking;
print Dumper $track; # $track is undef
When an anonymous object is created using
mock_obj()and call tracking is enabled, the methodcall_tracking()called on the created object returns undef.Steps to reproduce: