Created my first Goodie

master
blainester 2014-11-18 06:46:11 +00:00
parent 7cfb7db663
commit 055f5b1811
2 changed files with 47 additions and 0 deletions

View File

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

22
t/IsAwesome/blainester.t Normal file
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_blainester";
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::IsAwesome::blainester )],
# At a minimum, be sure to include tests for all:
# - primary_example_queries
# - secondary_example_queries
'duckduckhack blainester' => test_zci('blainester 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 blainester is awesome' => undef,
);
done_testing;