Test::Kantan::Expect - Assertion
expect($x)->to_be(3);
expect($x)->to_be_defined()
Pass if the value is defined.
expect($x)->to_be_truthy()
expect($x)->to_be_true()
Pass if the value is truthy.
expect($x)->to_be_falsy()
expect($x)->to_be_false()
Pass if the value is falsy.
expect($x)->to_equal($y)
expect($x)->to_be($y)
Pass if the value to equal $y.
expect($code : CodeRef)->to_throw()
Take the coderef. Pass if the code throws exception.
expect($x)->to_match($re : Regexp)
Pass if $x matches $re.
expect($x)->to_be_a($v : Regexp)
expect($x)->to_be_an($v : Regexp)
Pass if $x->$_isa($v) is true.
$x->$_isa($v)
To install Test::Kantan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Kantan
CPAN shell
perl -MCPAN -e shell install Test::Kantan
For more information on module installation, please visit the detailed CPAN module installation guide.