Created my first Goodie

master
kfloey 2014-11-22 17:15:52 +00:00
parent f67e45ae4d
commit d432847cce
2 changed files with 44 additions and 0 deletions

View File

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

19
t/IsAwesome/kfloey.t Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "is_awesome_kfloey";
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::IsAwesome::kfloey
)],
'duckduckhack kfloey' => test_zci('kfloey is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
'duckduckhack kfloey is awesome' => undef,
);
done_testing;