Skip to content
Browse files

Merge pull request #172 from duckduckgo/zt/goodie-test

Use Test::Deep for goodie tests
  • Loading branch information...
2 parents 7f5f466 + 30cea3c commit 90fc46a46950f68817f8253cfe58c3e55c15c191 @GuiltyDolphin GuiltyDolphin committed Apr 8, 2016
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/DDG/IsControllable.pm
  2. +2 −1 lib/DDG/Test/Goodie.pm
View
2 lib/DDG/IsControllable.pm
@@ -17,7 +17,7 @@ anything else.
has is_cached => (
is => 'ro',
- default => sub { shift->isa("DDG::ZeroClickInfo::Spice") ? 1 : 0 },
+ default => sub { shift->isa('DDG::ZeroClickInfo::Spice') ? 1 : 0 },
);
=attr is_unsafe
View
3 lib/DDG/Test/Goodie.pm
@@ -5,6 +5,7 @@ use strict;
use warnings;
use Carp;
use Test::More;
+use Test::Deep;
use DDG::Test::Block;
use DDG::ZeroClickInfo;
use Package::Stash;
@@ -108,7 +109,7 @@ testing your L<DDG::Goodie> alone or in combination with others.
}
}
$zci->{caller} = $answer->caller; # TODO: Review all this cheating; seriously.
- is_deeply($answer,$zci,'Deep: full ZCI object');
+ cmp_deeply($answer,$zci,'Deep: full ZCI object');
} else {
fail('Expected result but dont get one on '.$query) unless defined $answer;
}

0 comments on commit 90fc46a

Please sign in to comment.
Something went wrong with that request. Please try again.