Created my first Goodie

master
samph 2015-02-01 18:46:30 +00:00
parent 0515f82cd0
commit 3870ad82c1
2 changed files with 42 additions and 0 deletions

View File

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

18
t/IsAwesome/samph.t Normal file
View File

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