Permalink
Browse files

Test-Deep-Type-0.002

          - 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...
1 parent 6877d90 commit 6196bc841b67fff8b7f82ce30bf46abbcb95c209 @karenetheridge committed Mar 4, 2013
Showing with 12 additions and 4 deletions.
  1. +2 −0 Changes
  2. +10 −4 README.md
View
@@ -1,6 +1,8 @@
Revision history for {{$dist->name}}
{{$NEXT}}
+
+0.002 2013-03-04 10:43:05 PST-0800 (Karen Etheridge)
- 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.*)
View
@@ -4,7 +4,7 @@ Test::Deep::Type - A Test::Deep plugin for validating type constraints
# VERSION
-version 0.001
+version 0.002
# SYNOPSIS
@@ -14,9 +14,15 @@ version 0.001
use MooseX::Types::Moose 'Str';
cmp_deeply(
- { message => 'ack I am slain' },
- { message => is_type(Str) },
- 'message is a plain string',
+ {
+ message => 'ack I am slain',
+ 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

0 comments on commit 6196bc8

Please sign in to comment.