Mock::Quick::Object3pm
Object mocking for mock::quick
Usage
use Mock::Quick::Object;use Mock::Quick::Method;my $obj = Mock::Quick::Object->new(foo => 'bar', # define attributedo_it => qmeth { ... }, # define method...);is( $obj->foo, 'bar' );$obj->foo( 'baz' );is( $obj->foo, 'baz' );$obj->do_it();# define the new attribute automatically$obj->bar( 'xxx' );# define a new method on the fly$obj->baz( Mock::Quick::Method->new( sub { ... });# remove an attribute or method$obj->baz( \$Mock::Quick::Util::CLEAR );
Overview
Provides object mocking. See Mock::Quick for a better interface.
Releases
6 releases since Debian 8 (Jessie); the text changed 2 times.