--- /dev/null
+use strict;
+use warnings;
+use Test::More qw(no_plan);
+use Test::Moose;
+use Test::Exception;
+use aliased 'LolCatalyst::Lite::Snippet';
+
+{ package MockTranslator;
+ use Moose;
+ sub can_translate_to { $_[1] eq 'uc' };
+
+ sub translate { return uc $_[1] };
+}
+
+my ($id, $snippet);
+
+has_attribute_ok(Snippet, "id", "Snippets know about thier own id");
+has_attribute_ok(Snippet, "text", "Snippets have text attr");
+
+
+dies_ok {
+ $snippet = Snippet->new(
+ id => rand 9_999,
+ translator => MockTranslator->new
+ )
+} qr/\(text\) is required/;
+
+dies_ok {
+ $snippet = Snippet->new(
+ text => "hi there",
+ translator => MockTranslator->new
+ )
+} qr/\(id\) is required/;
+
+dies_ok {
+ $snippet = Snippet->new(
+ id => rand 9_999,
+ text => "hi there",
+ )
+} qr/\(translator\) is required/;
+
+lives_ok {
+ $snippet = Snippet->new(
+ id => ($id = rand 9_999),
+ text => "hi there",
+ translator => MockTranslator->new
+ )
+} "Can create a snippet";
+
+is($snippet->id, $id, "this snippet has the right id");
+is($snippet->text, "hi there");
+
+is($snippet->translated(), "HI THERE", "and the snippet can be translated");
+
+