Permalink
Browse files

bring in tests from t/15func2.t

  • Loading branch information...
1 parent 11c480c commit 501cc1f03c5643ec52b9b3f7a2f871e75f3c70c5 @book committed Mar 31, 2012
Showing with 9 additions and 20 deletions.
  1. +9 −2 lib/Test/MetaSyntactic.pm
  2. +0 −18 t/15func2.t
View
11 lib/Test/MetaSyntactic.pm
@@ -134,13 +134,20 @@ sub subtest_theme {
sub subtest_import {
my ($theme) = @_;
my $tb = __PACKAGE__->builder;
- $tb->plan( tests => 1 );
+ $tb->plan( tests => 2 );
if( $theme =~ /^(?:any|random)$/) {
- $tb->skip( "Not testing import for theme $theme", 1 );
+ $tb->skip( "Not testing import for theme $theme" );
+ $tb->skip( "Not testing import for theme $theme" );
}
else {
my %seen = map { $_ => 1 } _theme_items( $theme );
+
+ no strict 'refs';
+ $tb->ok( exists ${"Test::MetaSyntactic::SCRATCH\::"}{"meta$theme"},
+ "meta$theme exported"
+ );
+
package Test::MetaSyntactic::SCRATCH;
no strict 'refs';
my @names = "meta$theme"->();
View
18 t/15func2.t
@@ -1,18 +0,0 @@
-use Test::More;
-use strict;
-use Acme::MetaSyntactic::batman;
-
-plan tests => 2;
-
-# the default list
-no warnings;
-my @names = metabatman();
-my %seen = map { $_ => 1 } @Acme::MetaSyntactic::batman::List;
-ok( exists $seen{$names[0]}, "metabatman" );
-
-is_deeply(
- [ sort grep { /^meta\w+$/ } keys %:: ],
- [qw( metabatman )],
- "Default exported function"
-);
-

0 comments on commit 501cc1f

Please sign in to comment.