Move author tests to xt. Finish adding version nums everywhere, and test it.
Dave Rolsky [Sun, 17 Jan 2010 22:29:26 +0000 (16:29 -0600)]
lib/Catalyst/Action/Deserialize/YAML.pm
lib/Catalyst/Action/Serialize/View.pm
xt/pod.t [moved from t/pod.t with 100% similarity]
xt/version-numbers.t [new file with mode: 0644]

index a2a116e..85c2f2a 100644 (file)
@@ -6,6 +6,9 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use YAML::Syck;
 
+our $VERSION = '0.81';
+$VERSION = eval $VERSION;
+
 sub execute {
     my $self = shift;
     my ( $controller, $c, $test ) = @_;
index 286fc88..7fd2cdc 100644 (file)
@@ -4,6 +4,9 @@ use namespace::autoclean;
 
 extends 'Catalyst::Action';
 
+our $VERSION = '0.81';
+$VERSION = eval $VERSION;
+
 sub execute {
     my $self = shift;
     my ( $controller, $c, $view ) = @_;
similarity index 100%
rename from t/pod.t
rename to xt/pod.t
diff --git a/xt/version-numbers.t b/xt/version-numbers.t
new file mode 100644 (file)
index 0000000..69b7cb9
--- /dev/null
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+
+use File::Find::Rule;
+use Module::Info;
+
+use Test::More qw( no_plan );
+
+my %versions;
+for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in('lib' ) ) {
+    my $mod = Module::Info->new_from_file($pm_file);
+
+    ( my $stripped_file = $pm_file ) =~ s{^lib/}{};
+
+    $versions{$stripped_file} = $mod->version;
+}
+
+my $moose_ver = $versions{'Catalyst/Action/REST.pm'};
+
+for my $module ( grep { $_ ne 'Catalyst/Action/REST.pm' } sort keys %versions ) {
+    is( $versions{$module}, $moose_ver,
+        "version for $module is the same as in Catalyst/Action/REST.pm" );
+}