Test2::Plugin::Wrap2ndArgumentOfFailedCompareTestWithString - A Test2 plugin that wraps 2nd argument of failed assertions with string()
string()
use Test2::Plugin::Wrap2ndArgumentOfFailedCompareTestWithString;
Test2::Plugin::Wrap2ndArgumentOfFailedCompareTestWithString is a Test2 plugin that wraps 2nd argument of failed assertions with string().
use URI; my $url = 'https://www.example.com' my $uri = URI->new('https://www.example.com/'); is $url, $uri;
The above test passes on Test::More because Test::More::is compares both arguments as string. On the contrary, the test fails on Test2::V0 because Test2::V0::is checks both arguments are equal structurely (a string is not a URI instance).
Test::More::is
Test2::V0::is
use URI; my $url = 'https://www.example.com' my $uri = URI->new('https://www.example.com/'); is $url, string($uri);
This test passes on Test2::V0 because string() enforces string comparison.
Copyright (C) utgwkk.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
utgwkk <utagawakiki@gmail.com>
To install App::MigrateToTest2V0, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MigrateToTest2V0
CPAN shell
perl -MCPAN -e shell install App::MigrateToTest2V0
For more information on module installation, please visit the detailed CPAN module installation guide.