Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
limitusus committed Apr 20, 2012
1 parent bc502e5 commit 6be1ae6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e3/lib/Tweet.pm
Expand Up @@ -4,13 +4,15 @@ use strict;
use warnings;

use DateTime;
use Time::HiRes;

sub new {
my $class = shift;
my %info = @_;
my $stamp = Time::HiRes::time();
my $self = {
owner => $info{owner},
stamp => DateTime->now,
stamp => DateTime->from_epoch(epoch => $stamp),
message => $info{message},
};
return bless $self, $class;
Expand Down
2 changes: 2 additions & 0 deletions e3/t/forest.t
Expand Up @@ -69,6 +69,8 @@ sub tweet :Tests {
$b1->tweet("Hello!");
$b2->tweet("Hi!");
$b1->tweet("hoge");
use Data::Dumper;
warn Dumper(\{$b2->friends_timeline});
is $b1->tweets->[0]->message, "Hello!";
is $b1->tweets->[1]->message, "hoge";
is $b2->tweets->[0]->message, "Hi!";
Expand Down

0 comments on commit 6be1ae6

Please sign in to comment.