Skip to content

Commit

Permalink
t/basic: add test for attribute being setable
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Jul 17, 2014
1 parent 17b12ca commit 1c44fee
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ subtest "Parameters for HTTP::Tiny::Mech" => sub {
package Foo;
@Foo::ISA = ('WWW::Mechanize');
}
{

package Bar;
@Bar::ISA = ('WWW::Mechanize');
}
my $instance = HTTP::Tiny::Mech->new( mechua => Foo->new(), );
isa_ok( $instance, 'HTTP::Tiny' );
isa_ok( $instance, 'HTTP::Tiny::Mech' );
isa_ok( $instance->mechua, 'WWW::Mechanize' );
isa_ok( $instance->mechua, 'Foo' );
subtest "Set mechua" => sub {
$instance->mechua( Bar->new() );
isa_ok( $instance->mechua, 'WWW::Mechanize' );
isa_ok( $instance->mechua, 'Bar' );
};

};

subtest "Parameters for HTTP::Tiny" => sub {
Expand Down

0 comments on commit 1c44fee

Please sign in to comment.