Created my first Goodie

master
Kefkius 2014-12-02 09:17:06 +00:00
parent ceaa82893e
commit 34c4d41cff
2 changed files with 49 additions and 0 deletions

View File

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

24
t/IsAwesome/kefkius.t Normal file
View File

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