Index: t/09-outline.t
===================================================================
--- t/09-outline.t	(revision 14310)
+++ t/09-outline.t	(working copy)
@@ -9,6 +9,7 @@
 use Test::More;
 use Test::Differences;
 use PPI;
+use PPIx::EditorTools::Outline;
 
 BEGIN {
 	if ( $PPI::VERSION =~ /_/ ) {
@@ -108,9 +109,134 @@
 	},
 );
 
-plan tests => @cases * 1;
+##############
+# Moose outline testing follows
+##############
 
-use PPIx::EditorTools::Outline;
+push @cases, (
+	{   file     => 't/outline/Mooclass.pm',
+		expected => [
+			{   'modules' => [
+					{   'name' => 'MooseX::Declare',
+						'line' => 1,
+					},
+				],
+				'methods' => [
+					{   'name' => 'pub_sub',
+						'line' => 12,
+					},
+					{   'name' => '_pri_sub',
+						'line' => 16,
+					},
+					{   'name' => 'mm_before',
+						'line' => 20
+					},
+					{   'name' => 'mm_after',
+						'line' => 24
+					},
+					{   'name' => 'mm_around',
+						'line' => 28
+					},
+					{   'name' => 'mm_override',
+						'line' => 32
+					},
+					{   'name' => 'mm_augment',
+						'line' => 36
+					},
+				],
+				'line'       => 3,
+				'name'       => 'Mooclass',
+				'attributes' => [
+					{   'name' => 'moo_att',
+						'line' => 5
+					},
+					{   'name' => 'label',
+						'line' => 7
+					},
+					{   'name' => 'progress',
+						'line' => 7
+					},
+					{   'name' => 'butWarn',
+						'line' => 7
+					},
+					{   'name' => 'butTime',
+						'line' => 7
+					},
+					{   'name' => 'start_stop',
+						'line' => 7
+					},
+					{   'name' => 'account',
+						'line' => 10
+					},
+				],
+			}
+		],
+	},
+	{   file     => 't/outline/Moorole.pm',
+		expected => [
+			{   'modules' => [
+					{   'name' => 'MooseX::Declare',
+						'line' => 1,
+					},
+				],
+				'line' => 3,
+				'name' => 'Moorole',
+
+				'attributes' => [
+					{   'line' => 7,
+						'name' => 'balance'
+					},
+					{   'line' => 13,
+						'name' => 'overdraft'
+					}
+				],
+				'pragmata' => [
+					{   'line' => 5,
+						'name' => 'version'
+					}
+				]
+			}
+		]
+	},
+	{   file     => 't/outline/Moofirst.pm',
+		expected => [
+			{   'attributes' => [
+					{   'line' => 7,
+						'name' => 'balance'
+					},
+					{   'line' => 13,
+						'name' => 'overdraft'
+					},
+					{   'line' => 23,
+						'name' => 'name'
+					},
+					{   'line' => 25,
+						'name' => 'account'
+					}
+				],
+				'line'    => 3,
+				'methods' => [
+					{   'line' => 27,
+						'name' => '_build_overdraft'
+					}
+				],
+				'modules' => [
+					{   'line' => 1,
+						'name' => 'MooseX::Declare'
+					}
+				],
+				'name'     => 'Moofirst',
+				'pragmata' => [
+					{   'line' => 5,
+						'name' => 'version'
+					}
+				]
+			}
+		]
+	},
+);
+
+plan tests => @cases * 1;
 
 foreach my $c (@cases) {
 	my $code = $c->{code};
@@ -121,7 +247,7 @@
 	}
 	my $outline = PPIx::EditorTools::Outline->new->find( code => $code );
 
-	#diag explain $outline;
+
 	is_deeply $outline, $c->{expected} or diag explain $outline;
 }
 
Index: t/10-lexer.t
===================================================================
--- t/10-lexer.t	(revision 14310)
+++ t/10-lexer.t	(working copy)
@@ -9,6 +9,7 @@
 use Test::More;
 use Test::Differences;
 use PPI;
+use Data::Dumper;
 
 BEGIN {
 	if ( $PPI::VERSION =~ /_/ ) {
@@ -29,183 +30,139 @@
 
 END_CODE
 		expected => [
-			[   'keyword',
-				1,
-				1,
-				3
-			],
-			[   'Whitespace',
-				1,
-				4,
-				1
-			],
-			[   'pragma',
-				1,
-				5,
-				6
-			],
-			[   'Structure',
-				1,
-				11,
-				1
-			],
-			[   'Whitespace',
-				1,
-				12,
-				1
-			],
-			[   'keyword',
-				1,
-				13,
-				3
-			],
-			[   'Whitespace',
-				1,
-				16,
-				1
-			],
-			[   'pragma',
-				1,
-				17,
-				8
-			],
-			[   'Structure',
-				1,
-				25,
-				1
-			],
-			[   'Whitespace',
-				1,
-				26,
-				1
-			],
-			[   'keyword',
-				2,
-				1,
-				3
-			],
-			[   'Whitespace',
-				2,
-				4,
-				1
-			],
-			[   'Word',
-				2,
-				5,
-				3
-			],
-			[   'Structure',
-				2,
-				8,
-				1
-			],
-			[   'Whitespace',
-				2,
-				9,
-				1
-			],
-			[   'Whitespace',
-				3,
-				1,
-				1
-			],
-			[   'keyword',
-				4,
-				1,
-				2
-			],
-			[   'Whitespace',
-				4,
-				3,
-				1
-			],
-			[   'Symbol',
-				4,
-				4,
-				7
-			],
-			[   'Whitespace',
-				4,
-				11,
-				1
-			],
-			[   'Operator',
-				4,
-				12,
-				1
-			],
-			[   'Whitespace',
-				4,
-				13,
-				1
-			],
-			[   'Number',
-				4,
-				14,
-				2
-			],
-			[   'Structure',
-				4,
-				16,
-				1
-			],
-			[   'Whitespace',
-				4,
-				17,
-				1
-			],
-			[   'Whitespace',
-				5,
-				1,
-				1
-			],
-			[   'keyword',
-				6,
-				1,
-				3
-			],
-			[   'Whitespace',
-				6,
-				4,
-				1
-			],
-			[   'Word',
-				6,
-				5,
-				4
-			],
-			[   'Whitespace',
-				6,
-				9,
-				1
-			],
-			[   'Structure',
-				6,
-				10,
-				1
-			],
-			[   'Whitespace',
-				6,
-				11,
-				1
-			],
-			[   'Structure',
-				7,
-				1,
-				1
-			],
-			[   'Whitespace',
-				7,
-				2,
-				1
-			],
-			[   'Whitespace',
-				8,
-				1,
-				1
-			],
+			[ 'keyword',    1, 1,  3 ],
+			[ 'Whitespace', 1, 4,  1 ],
+			[ 'pragma',     1, 5,  6 ],
+			[ 'Structure',  1, 11, 1 ],
+			[ 'Whitespace', 1, 12, 1 ],
+			[ 'keyword',    1, 13, 3 ],
+			[ 'Whitespace', 1, 16, 1 ],
+			[ 'pragma',     1, 17, 8 ],
+			[ 'Structure',  1, 25, 1 ],
+			[ 'Whitespace', 1, 26, 1 ],
+			[ 'keyword',    2, 1,  3 ],
+			[ 'Whitespace', 2, 4,  1 ],
+			[ 'Word',       2, 5,  3 ],
+			[ 'Structure',  2, 8,  1 ],
+			[ 'Whitespace', 2, 9,  1 ],
+			[ 'Whitespace', 3, 1,  1 ],
+			[ 'keyword',    4, 1,  2 ],
+			[ 'Whitespace', 4, 3,  1 ],
+			[ 'Symbol',     4, 4,  7 ],
+			[ 'Whitespace', 4, 11, 1 ],
+			[ 'Operator',   4, 12, 1 ],
+			[ 'Whitespace', 4, 13, 1 ],
+			[ 'Number',     4, 14, 2 ],
+			[ 'Structure',  4, 16, 1 ],
+			[ 'Whitespace', 4, 17, 1 ],
+			[ 'Whitespace', 5, 1,  1 ],
+			[ 'keyword',    6, 1,  3 ],
+			[ 'Whitespace', 6, 4,  1 ],
+			[ 'Word',       6, 5,  4 ],
+			[ 'Whitespace', 6, 9,  1 ],
+			[ 'Structure',  6, 10, 1 ],
+			[ 'Whitespace', 6, 11, 1 ],
+			[ 'Structure',  7, 1,  1 ],
+			[ 'Whitespace', 7, 2,  1 ],
+			[ 'Whitespace', 8, 1,  1 ],
+		],
+	},
+	{   code => <<'END_CODE',
+sub return func method before after around override augment
+END_CODE
+		expected => [
+			[ 'keyword',    1, 1,  3 ],
+			[ 'Whitespace', 1, 4,  1 ],
+			[ 'keyword',    1, 5,  6 ],
+			[ 'Whitespace', 1, 11, 1 ],
+			[ 'Word',       1, 12, 4 ],
+			[ 'Whitespace', 1, 16, 1 ],
+			[ 'Word',       1, 17, 6 ],
+			[ 'Whitespace', 1, 23, 1 ],
+			[ 'Word',       1, 24, 6 ],
+			[ 'Whitespace', 1, 30, 1 ],
+			[ 'Word',       1, 31, 5 ],
+			[ 'Whitespace', 1, 36, 1 ],
+			[ 'Word',       1, 37, 6 ],
+			[ 'Whitespace', 1, 43, 1 ],
+			[ 'Word',       1, 44, 8 ],
+			[ 'Whitespace', 1, 52, 1 ],
+			[ 'Word',       1, 53, 7 ],
+			[ 'Whitespace', 1, 60, 1 ],
+
+		],
+	},
+	{   code => <<'END_CODE',
+undef shift defined bless
+END_CODE
+		expected => [
+			[ 'core',       1, 1,  5 ],
+			[ 'Whitespace', 1, 6,  1 ],
+			[ 'core',       1, 7,  5 ],
+			[ 'Whitespace', 1, 12, 1 ],
+			[ 'core',       1, 13, 7 ],
+			[ 'Whitespace', 1, 20, 1 ],
+			[ 'core',       1, 21, 5 ],
+			[ 'Whitespace', 1, 26, 1 ],
+		],
+	},
+	{   code => <<'END_CODE',
+new
+END_CODE
+		expected => [ [ 'Word', 1, 1, 3 ], [ 'Whitespace', 1, 4, 1 ], ],
+	},
+	{   code => <<'END_CODE',
+use no
+END_CODE
+		expected => [
+			[ 'keyword',    1, 1, 3 ],
+			[ 'Whitespace', 1, 4, 1 ],
+			[ 'keyword',    1, 5, 2 ],
+			[ 'Whitespace', 1, 7, 1 ],
+		],
+	},
+	{   code => <<'END_CODE',
+my local our
+END_CODE
+		expected => [
+			[ 'keyword',    1, 1,  2 ],
+			[ 'Whitespace', 1, 3,  1 ],
+			[ 'keyword',    1, 4,  5 ],
+			[ 'Whitespace', 1, 9,  1 ],
+			[ 'keyword',    1, 10, 3 ],
+			[ 'Whitespace', 1, 13, 1 ],
+
+		],
+	},
+
+	{   code => <<'END_CODE',
+if else elsif unless for foreach while my
+END_CODE
+		expected => [
+			[ 'keyword',    1, 1,  2 ],
+			[ 'Whitespace', 1, 3,  1 ],
+			[ 'keyword',    1, 4,  4 ],
+			[ 'Whitespace', 1, 8,  1 ],
+			[ 'keyword',    1, 9,  5 ],
+			[ 'Whitespace', 1, 14, 1 ],
+			[ 'keyword',    1, 15, 6 ],
+			[ 'Whitespace', 1, 21, 1 ],
+			[ 'keyword',    1, 22, 3 ],
+			[ 'Whitespace', 1, 25, 1 ],
+			[ 'keyword',    1, 26, 7 ],
+			[ 'Whitespace', 1, 33, 1 ],
+			[ 'keyword',    1, 34, 5 ],
+			[ 'Whitespace', 1, 39, 1 ],
+			[ 'keyword',    1, 40, 2 ],
+			[ 'Whitespace', 1, 42, 1 ],
+
 		],
 	},
+	{   code => <<'END_CODE',
+package
+END_CODE
+		expected => [ [ 'keyword', 1, 1, 7 ], [ 'Whitespace', 1, 8, 1 ], ],
+	},
 );
 
 plan tests => @cases * 1;
@@ -215,15 +172,14 @@
 my @result;
 foreach my $c (@cases) {
 	@result = ();
-	PPIx::EditorTools::Lexer->new->lexer( code => $c->{code}, highlighter => \&highlighter );
-
-	#diag explain @result;
-	is_deeply \@result, $c->{expected};
+	PPIx::EditorTools::Lexer->new->lexer(
+		code        => $c->{code},
+		highlighter => \&highlighter
+	);
+	is_deeply \@result, $c->{expected} or diag explain @result;
 }
 
 sub highlighter {
 	push @result, [@_];
 }
 
-
-
Index: t/outline/Moofirst.pm
===================================================================
--- t/outline/Moofirst.pm	(revision 0)
+++ t/outline/Moofirst.pm	(revision 0)
@@ -0,0 +1,30 @@
+use MooseX::Declare;
+
+role Moofirst {
+	requires '_build_overdraft';
+	use version; our $VERSION = version->new('1.0.1');
+
+	has 'balance' => (
+		isa     => 'Num',
+		is      => 'rw',
+		default => 0
+	);
+
+	has 'overdraft' => (
+		isa        => 'Bool',
+		is         => 'rw',
+		lazy_build => 1,
+		init_arg   => undef,
+	);
+}
+
+class Mooclass {
+
+	has 'name' => ( isa => 'Str', is => 'rw', );
+
+	has qw(account) => ( is => 'rw', );
+
+	method _build_overdraft {
+		return;
+	}
+}
Index: t/outline/Moorole.pm
===================================================================
--- t/outline/Moorole.pm	(revision 0)
+++ t/outline/Moorole.pm	(revision 0)
@@ -0,0 +1,20 @@
+use MooseX::Declare;
+
+role Moorole {
+	requires '_build_overdraft';
+	use version; our $VERSION = version->new('1.0.1');
+
+	has 'balance' => (
+		isa     => 'Num',
+		is      => 'rw',
+		default => 0
+	);
+
+	has 'overdraft' => (
+		isa        => 'Bool',
+		is         => 'rw',
+		lazy_build => 1,
+		init_arg   => undef,
+	);
+}
+
Index: t/outline/Mooclass.pm
===================================================================
--- t/outline/Mooclass.pm	(revision 0)
+++ t/outline/Mooclass.pm	(revision 0)
@@ -0,0 +1,40 @@
+use MooseX::Declare;
+
+class Mooclass {
+
+	has 'moo_att' => ( is => 'rw', );
+
+	has [qw/ label progress butWarn butTime start_stop /] =>
+		( isa => 'Ref', is => 'rw' );
+
+	has qw(account) => ( is => 'rw', );
+
+	method pub_sub {
+		return;
+	}
+
+	method _pri_sub {
+		return;
+	}
+
+	before mm_before {
+		return;
+	}
+
+	after mm_after {
+		return;
+	}
+	
+	around mm_around {
+		return;
+	}
+	
+	override mm_override {
+		return;
+	}
+	
+	augment mm_augment {
+		return;
+	}
+}
+
Index: t/00-ppix-editortools.t
===================================================================
--- t/00-ppix-editortools.t	(revision 0)
+++ t/00-ppix-editortools.t	(revision 0)
@@ -0,0 +1,117 @@
+#!/usr/bin/eval perl
+
+use strict;
+use English '-no_match_vars';
+
+BEGIN {
+	$WARNING = 1;
+}
+use Test::More tests => 39;
+use Test::Exception;
+######
+# let's check our requirments.
+######
+use_ok('Carp');
+
+### you could do this but why?
+#
+#use Carp qw(croak);
+#eval( use_ok( 'PPI', '1.215' ) );
+#if ($EVAL_ERROR) { croak; }
+#
+### when you can just do this
+use_ok( 'PPI', '1.215' );
+use_ok('PPI::Find');
+use_ok( 'Class::XSAccessor', '1.02' );
+use_ok('File::Spec');
+use_ok('File::Basename');
+use_ok('File::Find');
+use_ok('File::Temp');
+use_ok( 'Test::More', '0.88' );
+
+#use_ok( 'Test::Most'); # craps out !!
+use_ok('Test::Differences');
+
+#use_ok( 'Test::NoWarnings', '0.084'); # craps out !!
+
+######
+# let's check our package.
+######
+my $pet_obj;
+require PPIx::EditorTools;
+$pet_obj = new_ok('PPIx::EditorTools');
+
+my @subs =
+	qw( new code ppi process_doc find_unmatched_brace get_all_variable_declarations element_depth find_token_at_location find_variable_declaration );
+use_ok( 'PPIx::EditorTools', @subs );
+
+foreach my $subs (@subs) {
+	can_ok( 'PPIx::EditorTools', $subs );
+}
+
+#TODO need more pkg tests
+use PPIx::EditorTools;
+
+# Check that something died - we do not care why
+dies_ok { PPIx::EditorTools->process_doc() } 'expecting PPIx::EditorTools->process_doc() to die';
+
+my %case = ( one => 'use strict;', two => 'use warnings', );
+my $obj = PPIx::EditorTools->new();
+$obj->code('use strict; use warnings');
+$obj->ppi(undef);
+ok( $obj->process_doc(%case), 'process_doc(code)' );
+
+%case = ( one => 'ppi', two => 'PPI::Document', );
+$obj->ppi('PPI::Document');
+$obj->code(undef);
+ok( $obj->process_doc(%case), 'process_doc(ppi)' );
+
+$obj->ppi(undef);
+$obj->code(undef);
+
+#not_ok ( $obj->process_doc( %case), 'process_doc(ppi)' );
+
+throws_ok { $obj->process_doc(%case) } '/arguments ppi or code required/', 'arguments ppi or code required';
+
+dies_ok { PPIx::EditorTools->find_unmatched_brace() } 'expecting PPIx::EditorTools->find_unmatched_brace() to die';
+dies_ok { PPIx::EditorTools->get_all_variable_declarations() }
+'expecting PPIx::EditorTools->get_all_variable_declarations() to die';
+dies_ok { PPIx::EditorTools->element_depth() } 'expecting PPIx::EditorTools->element_depth() to die';
+dies_ok { PPIx::EditorTools->find_token_at_location() } 'expecting PPIx::EditorTools->find_token_at_location() to die';
+
+#dies_ok { PPIx::EditorTools->find_variable_declaration() } 'expecting PPIx::EditorTools->find_variable_declaration() to die';
+######
+# let's check our lib's are here.
+######
+my $test_object;
+require PPIx::EditorTools::FindUnmatchedBrace;
+$test_object = new_ok('PPIx::EditorTools::FindUnmatchedBrace');
+
+require PPIx::EditorTools::FindVariableDeclaration;
+$test_object = new_ok('PPIx::EditorTools::FindVariableDeclaration');
+
+require PPIx::EditorTools::IntroduceTemporaryVariable;
+$test_object = new_ok('PPIx::EditorTools::IntroduceTemporaryVariable');
+
+require PPIx::EditorTools::RenamePackage;
+$test_object = new_ok('PPIx::EditorTools::RenamePackage');
+
+require PPIx::EditorTools::RenamePackageFromPath;
+$test_object = new_ok('PPIx::EditorTools::RenamePackageFromPath');
+
+require PPIx::EditorTools::RenameVariable;
+$test_object = new_ok('PPIx::EditorTools::RenameVariable');
+
+require PPIx::EditorTools::FindUnmatchedBrace;
+$test_object = new_ok('PPIx::EditorTools::FindUnmatchedBrace');
+
+require PPIx::EditorTools::Outline;
+$test_object = new_ok('PPIx::EditorTools::Outline');
+
+require PPIx::EditorTools::Lexer;
+$test_object = new_ok('PPIx::EditorTools::Lexer');
+
+require PPIx::EditorTools::ReturnObject;
+$test_object = new_ok('PPIx::EditorTools::ReturnObject');
+
+done_testing()
