Last active
August 29, 2015 14:25
-
-
Save autarch/6f5ab86102b15a4b6299 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Test::Requires { | |
| 'Test::Stream::Tester' => 0, | |
| 'Test::Builder ' => '1.0302007', | |
| }; | |
| use Test::Stream::Tester; | |
| use Test::More; | |
| use Test::Moose; | |
| { | |
| package Foo; | |
| use Moose; | |
| } | |
| { | |
| package Bar; | |
| use Moose; | |
| } | |
| { | |
| events_are( | |
| intercept { | |
| with_immutable { | |
| ok( Foo->meta->is_mutable ); | |
| } | |
| 'Foo'; | |
| }, | |
| events { | |
| event 'Subtest' => sub { | |
| event_call diag => [qr/Foo is not immutable/]; | |
| event_call subevents => events { | |
| event Ok => sub { | |
| event_call pass => 1; | |
| }; | |
| event Plan => { max => 1 }; | |
| }; | |
| }; | |
| event 'Subtest' => sub { | |
| event_call diag => [qr/Foo is immutable/]; | |
| event_call subevents => events { | |
| event Ok => sub { | |
| event_call pass => 0; | |
| }; | |
| event Plan => { max => 1 }; | |
| }; | |
| }; | |
| event Plan => { max => 2 }; | |
| }, | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment