Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (22 sloc) 0.666 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#!/usr/bin/perl

use strict;
use warnings;

#use Test::More 'no_plan';
use Test::More tests => 5;
use Test::Exception;

BEGIN {
use_ok ( 'Acme::KnowledgeWisdom' ) or exit;
}

exit main();

sub main {
my $kw_has_already = Acme::KnowledgeWisdom->new('has_already' => 1);
isa_ok($kw_has_already, 'Acme::KnowledgeWisdom', 'are you sure?');
is($kw_has_already->get, 42, 'get if has already');

# not in questions
my $kw_answers = Acme::KnowledgeWisdom->new('in_questions' => 0);
is($kw_answers->get, 42, 'get if in answers');

# in questions
my $kw_questions = Acme::KnowledgeWisdom->new();
dies_ok { $kw_questions->get } 'get if in questions';

return 0;
}

Something went wrong with that request. Please try again.