Tutorial completed

master
ettienne 2015-07-10 10:37:05 +00:00
parent 985cda2070
commit f655f0ab81
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,37 @@
package DDG::Goodie::IsAwesome::Sloff;
# ABSTRACT: Write an abstract here
# Start at https://duck.co/duckduckhack/goodie_overview if you are new
# to instant answer development
use DDG::Goodie;
use strict;
zci answer_type => "is_awesome_sloff";
zci is_cached => 1;
# Metadata. See https://duck.co/duckduckhack/metadata for help in filling out this section.
name "IsAwesome Sloff";
description "My first goodie";
primary_example_queries "duckduckhack sloff";
# Uncomment and complete: https://duck.co/duckduckhack/metadata#category
category "special";
# Uncomment and complete: https://duck.co/duckduckhack/metadata#topics
topics "special_interest";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/Sloff.pm";
attribution github => ["https://github.com/Sloff/", "Sloff"];
# Triggers
triggers start => "duckduckhack sloff";
# Handle statement
handle remainder => sub {
# Return undef if there is something after the trigger
return if $_;
# Normal return text
return "Ettienne Pitts is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
};
1;

17
t/IsAwesome/Sloff.t Normal file
View File

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