Closed gugod closed 2 months ago
This looks cleaner than how I did it in t/installation2.t
- nice work!
This looks cleaner than how I did it in
t/installation2.t
- nice work!
Thanks.
Test2::Tools::Mock
ended up being pretty decent by itself, even without the interfaces of Test2::Mock
.
Furthermore... after your comment... when I started to rewrite more tests, I found out that
due to the extensive use of Test::Spec
and actually Test::Spec::Mock
, it became rather cumbersome to rewrite t/command-exec.t
with just Test2::Tools::Mock
and it doesn't look like Test2::Mock
would make the rewrite easier... so I latter decided to make a similar version of Test2::Tools::Mock
instead, named Mocked
, in test2_helper.pl
. It's not a drop-in replacement, but something that provides similar API , with somewhat manageable amount of changes on the caller side. That makes it a whole lot easier for the purpose of using Test2-based subroutines.
Test2::Tools::Spec
provides most of the features implemented inTest::Spec
and is nearly a drop-in replacement.Uses of methods from
Test::Spec::Mocks
needs to be reworked, namely whenexpects
are being used.