http://blog.ainam.me/2013/04/09/test-more-perl-testing/ http://lestrrat.ldblog.jp/archives/26535307.html package t::Util; use parent qw(Exporter); our @EXPORT = qw(lovetest $MOCK); use Test::More; sub lovetest { # setup local $MOCK = ...; # teardown 㯠guard object ã§ã goto \&Test::More::subtest; }ããã¦ãã¹ãã±ã¼ã¹ã¯ããã lovetest 'foo' => sub { ... $MOCK->do_something; };ã¨ããã®ãããæ°å¹´ã¯ãã¼ã ã Test::Class ãæè¿ã¯ã ãã¶ä½¿ããã
{{#tags}}- {{label}}
{{/tags}}