use Evo::Base -strict;
use Test::More tests => 3;
use Test::Fatal;
use Evo::Manager;

my $m = Evo::Manager->singleton;

my $train = $m->build_train;
my $way   = $train->way;

$way->add(sub { ok $train->is_current })->add(
  sub {
    my $t = $m->build_train;
    my $w = $t->way;
    $w->add(sub { ok !$train->is_current })->add(sub { ok $t->is_current });
    $t->start;
  }
);

$train->start;
