test snippetstore translator requirement, improve debugging, fix app
[catagits/catbook-code.git] / t / snippet_store / basic.t
index 5a46a3f..cc1aca6 100644 (file)
@@ -1,10 +1,15 @@
 use strict;
 use warnings;
 use Test::More qw(no_plan);
+use Test::Exception;
 
 use_ok "LolCatalyst::Lite::SnippetStore";
 
-my $store = LolCatalyst::Lite::SnippetStore->new;
+dies_ok {
+  LolCatalyst::Lite::SnippetStore->new;
+} 'Create without translator object fails';
+
+my $store = LolCatalyst::Lite::SnippetStore->new(translator => 'DUMMY');
 
 my $num_snips = 3;