Skip to content

Commit

Permalink
Test-Deep-Type-0.002
Browse files Browse the repository at this point in the history
          - fix extraction of type name from MooseX::Types types
          - make use of string overload to extract the type name
          - fix use of unescaped literal { in regexp (warns in 5.17.*)
  • Loading branch information
karenetheridge committed Mar 4, 2013
1 parent 6877d90 commit 6196bc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,8 @@
Revision history for {{$dist->name}} Revision history for {{$dist->name}}


{{$NEXT}} {{$NEXT}}

0.002 2013-03-04 10:43:05 PST-0800 (Karen Etheridge)
- fix extraction of type name from MooseX::Types types - fix extraction of type name from MooseX::Types types
- make use of string overload to extract the type name - make use of string overload to extract the type name
- fix use of unescaped literal { in regexp (warns in 5.17.*) - fix use of unescaped literal { in regexp (warns in 5.17.*)
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Test::Deep::Type - A Test::Deep plugin for validating type constraints


# VERSION # VERSION


version 0.001 version 0.002


# SYNOPSIS # SYNOPSIS


Expand All @@ -14,9 +14,15 @@ version 0.001
use MooseX::Types::Moose 'Str'; use MooseX::Types::Moose 'Str';


cmp_deeply( cmp_deeply(
{ message => 'ack I am slain' }, {
{ message => is_type(Str) }, message => 'ack I am slain',
'message is a plain string', counter => 123,
},
{
message => is_type(Str),
counter => is_type(sub { die "not an integer" unless int($_[0]) eq $_[0] }),
},
'message is a plain string, counter is a number',
); );


# DESCRIPTION # DESCRIPTION
Expand Down

0 comments on commit 6196bc8

Please sign in to comment.