first test for observer code
[scpubgit/DKit.git] / t / basic.t
index 5d62f1d..936a847 100644 (file)
--- a/t/basic.t
+++ b/t/basic.t
@@ -112,12 +112,7 @@ is_deeply(
 );
 
 my $pop_stack = FromCode->new(
-  code => sub {
-    my ($self, $state) = @_;
-    my @stack = @{$state->return_stack};
-    my $top = pop @stack;
-    $state->but(return_stack => \@stack, next_op => $top);
-  }
+  code => sub { $_[1]->pop_return_stack }
 );
 
 my $inner_op = make_op($pop_stack);