From: gfx Date: Thu, 29 Oct 2009 00:46:34 +0000 (+0900) Subject: Fix a test: is_class_loaded without arguments throws an error X-Git-Tag: 0.40_03~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=2a9a2118c30734915b9fb32521e6516c5a41992b Fix a test: is_class_loaded without arguments throws an error --- diff --git a/t/001_mouse/020-load-class.t b/t/001_mouse/020-load-class.t index 705c0db..311acd8 100644 --- a/t/001_mouse/020-load-class.t +++ b/t/001_mouse/020-load-class.t @@ -7,11 +7,11 @@ use Test::Exception; require Mouse; use lib 't/lib'; -ok(!Mouse::is_class_loaded(), "is_class_loaded with no argument returns false"); +ok(!Mouse::is_class_loaded(undef), "is_class_loaded with undef returns false"); ok(!Mouse::is_class_loaded(''), "can't load the empty class"); ok(!Mouse::is_class_loaded(\"foo"), "can't load a class name reference??"); -throws_ok { Mouse::load_class() } qr/Invalid class name \(undef\)/; +throws_ok { Mouse::load_class(undef) } qr/Invalid class name \(undef\)/; throws_ok { Mouse::load_class('') } qr/Invalid class name \(\)/; throws_ok { Mouse::load_class(\"foo") } qr/Invalid class name \(SCALAR\(\w+\)\)/;