GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::Mouse(3) User Contributed Perl Documentation Test::Mouse(3)

Test::Mouse - Test functions for Mouse specific features

  use Test::More plan => 1;
  use Test::Mouse;

  meta_ok($class_or_obj, "... Foo has a ->meta");
  does_ok($class_or_obj, $role, "... Foo does the Baz role");
  has_attribute_ok($class_or_obj, $attr_name, "... Foo has the 'bar' attribute");

This module provides some useful test functions for Mouse based classes. It is an experimental first release, so comments and suggestions are very welcome.

meta_ok ($class_or_object)
Tests if a class or object has a metaclass.
does_ok ($class_or_object, $role, ?$message)
Tests if a class or object does a certain role, similar to what "isa_ok" does for the "isa" method.
has_attribute_ok($class_or_object, $attr_name, ?$message)
Tests if a class or object has a certain attribute, similar to what "can_ok" does for the methods.
with_immutable { CODE } @class_names
Runs CODE *which should contain normal tests) twice, and make each class in @class_names immutable between the two runs.

Mouse

Test::Moose

Test::More

2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.