From c700061c7b00d18778389d0850d21f966bd25ec6 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 25 Apr 2012 01:36:31 -0500 Subject: cleanups --- t/01-basic.t | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 t/01-basic.t (limited to 't/01-basic.t') diff --git a/t/01-basic.t b/t/01-basic.t deleted file mode 100644 index d5951d4..0000000 --- a/t/01-basic.t +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env perl -use strict; -use warnings; -use Test::More tests => 9; -use Test::Exception; - -package Foo; -use Moose; -use MooseX::ABC; - -requires 'bar', 'baz'; - -package Foo::Sub1; -use Moose; -::lives_ok { extends 'Foo' } 'extending works when the requires are fulfilled'; -sub bar { } -sub baz { } - -package Foo::Sub2; -use Moose; -::throws_ok { extends 'Foo' } qr/Foo requires Foo::Sub2 to implement baz/, - 'extending fails with the correct error when requires are not fulfilled'; -sub bar { } - -package Foo::Sub::Sub; -use Moose; -::lives_ok { extends 'Foo::Sub1' } 'extending twice works'; - -package main; -my $foosub; -lives_ok { $foosub = Foo::Sub1->new } - 'instantiating concrete subclasses works'; -isa_ok($foosub, 'Foo', 'inheritance is correct'); -my $foosubsub; -lives_ok { $foosubsub = Foo::Sub::Sub->new } - 'instantiating deeper concrete subclasses works'; -isa_ok($foosubsub, 'Foo', 'inheritance is correct'); -isa_ok($foosubsub, 'Foo::Sub1', 'inheritance is correct'); -throws_ok { Foo->new } qr/Foo is abstract, it cannot be instantiated/, - 'instantiating abstract classes fails'; -- cgit v1.2.3-54-g00ecf