Rewriting existing tests using Test2
As an improvement point, we should probably replace current Test::More -based test code with Test2 .
Something like this? https://github.com/gugod/App-perlbrew/compare/develop...lukec:App-perlbrew:Test2-start
I could start chipping away at the other tests if it is helpful...
Personally I consider 01-option tests written using Test::YAFT
it q (should recognize option -D)
=> got => $app->{D}
=> expect => [qw(usethreads DEBUGGING)]
;
nok q (app shuld not be quiet'
=> got => $app->{quiet}
when using code to build got value, it automatically handles exceptions.
This test will fail when got {} code fails
it q (test message)
=> got { do something }
=> expect => $expectation
;
This test will fail when got {} code doesn't fail
it q (test message)
=> got { do something }
=> throws => $expectation
;
I've ported about half. I am getting into trickier ones and progress is slower, but i'll keep at it.
Personally I consider 01-option tests written using Test::YAFT
Looks interesting, and thanks for the information. But let's not mix other topics with this one, which is mainly for replacing the old Test::More-based test code. Feel free to follow-up in a separate issues / PR though.