Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created November 8, 2018 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/af30b4003fd3ce14d9b3a77a9b70ffaa to your computer and use it in GitHub Desktop.
Save Whateverable/af30b4003fd3ce14d9b3a77a9b70ffaa to your computer and use it in GitHub Desktop.
committable6
2018.10 use Test; throws-like q| class RT123078_2 { method foo { self!bar }; method bar { }; method baz { } } |, X::Method::NotFound, message => all(/<<"No such private method '!bar'" \W/, /<<'RT123078_2'>>/, /<<'bar'>>/, /<<'baz'>>/)
¦«2018.10»:
1..3
ok 1 - ' class RT123078_2 { method foo { self!bar }; method bar { }; method baz { } } ' died
ok 2 - right exception type (X::Method::NotFound)
ok 3 - .message matches all(/<<"No such private method '!bar'" \W/, /<<'RT123078_2'>>/, /<<'bar'>>/, /<<'baz'>>/)
ok 1 - did we throws-like X::Method::NotFound?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment