Created my first Goodie

master
claytonspinner 2014-12-06 22:38:57 +00:00
parent de879cab79
commit dbcbc506e5
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,24 @@
package DDG::Goodie::IsAwesome::claytonspinner;
# ABSTRACT: claytonspinner's first Goodie
use DDG::Goodie;
zci answer_type => "is_awesome_claytonspinner";
zci is_cached => 1;
name "IsAwesome claytonspinner";
description "My first Goodie, it let's the world know that claytonspinner is awesome";
primary_example_queries "duckduckhack claytonspinner";
category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/claytonspinner.pm";
attribution github => ["https://github.com/claytonspinner", "claytonspinner"],
triggers start => "duckduckhack claytonspinner";
handle remainder => sub {
return if $_;
return "claytonspinner is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
};
1;

View File

@ -0,0 +1,22 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "is_awesome_claytonspinner";
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::IsAwesome::claytonspinner )],
# At a minimum, be sure to include tests for all:
# - primary_example_queries
# - secondary_example_queries
'duckduckhack claytonspinner' => test_zci('claytonspinner is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
# Try to include some examples of queries on which it might
# appear that your answer will trigger, but does not.
'duckduckhack claytonspinner is awesome' => undef,
);
done_testing;