Skip to content

Instantly share code, notes, and snippets.

@omega
Created May 24, 2009 09:39
Show Gist options
  • Select an option

  • Save omega/117037 to your computer and use it in GitHub Desktop.

Select an option

Save omega/117037 to your computer and use it in GitHub Desktop.
andremar:(git)golf[master]/$ prove -l t/domain/round.t
t/domain/round.t....Name "BerkeleyDB::Term::Env" used only once: possible typo at /opt/local/lib/perl5/site_perl/5.10.0/darwin-2level/BerkeleyDB.pm line 826.
t/domain/round.t....1/6
# Failed test at t/domain/round.t line 23.
# got: '36588cc89e6b6f1ace2588743630b175ae7d4eb2'
# expected: 'f66e5acd49480a09b9efa2fd0fbdb66065465a85'
# Looks like you planned 6 tests but ran 1 extra.
# Looks like you failed 1 test of 7 run.
t/domain/round.t.... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests
Test Summary Report
-------------------
t/domain/round.t (Wstat: 256 Tests: 7 Failed: 2)
Failed tests: 3, 7
Non-zero exit status: 1
Parse errors: Bad plan. You planned 6 tests but ran 7.
Files=1, Tests=7, 9 wallclock secs ( 0.01 usr 0.00 sys + 2.41 cusr 0.49 csys = 2.91 CPU)
Result: FAIL
andremar:(git)golf[master]/$
has 'id' => (
traits => [qw/Extract/],
is => 'ro',
isa => 'Str',
lazy_build => 1,
);
method _build_id {
sha1_hex($self->date . "-"
. $self->course->name . "-" . rand(10000)
);
};
my $rid;
{
my $s = $D->new_scope;
my $r = $D->create(Round => {
players => 'omega',
course => 'Ekeberg',
date => '2009-05-22',
});
isa_ok($r, "Golf::Domain::Round");
$rid = $r->id;
}
{
my $r = $D->find(Round => { id => $rid });
is($r->course->name, "Ekeberg");
is($r->id, $rid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment