use Evo::Base -strict;
use Evo::Spy;
use Test::Spec;

describe 'spy origin', sub {
  it 'as argument for new' => sub {
    my $spy = Evo::Spy->new(origin => my $origin = sub { });
    is $spy->origin, $origin;
  };

  it 'as attr' => sub {
    my $spy = Evo::Spy->new->origin(my $origin = sub { });
    is $spy->origin, $origin;
  };
};

runtests unless caller;
