[Catalyst-commits] r14449 - in
Catalyst-Plugin-Session-Store-DBIC/trunk: . t t/lib
t/lib/TestApp/Model
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Fri Jun 14 16:29:17 GMT 2013
Author: t0m
Date: 2013-06-14 16:29:17 +0000 (Fri, 14 Jun 2013)
New Revision: 14449
Modified:
Catalyst-Plugin-Session-Store-DBIC/trunk/Changes
Catalyst-Plugin-Session-Store-DBIC/trunk/t/05dbic-schema.t
Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/SetupDB.pm
Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp.pm
Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp/Model/DBICSchema.pm
Log:
Fix RT#86148
Modified: Catalyst-Plugin-Session-Store-DBIC/trunk/Changes
===================================================================
--- Catalyst-Plugin-Session-Store-DBIC/trunk/Changes 2013-05-10 12:17:20 UTC (rev 14448)
+++ Catalyst-Plugin-Session-Store-DBIC/trunk/Changes 2013-06-14 16:29:17 UTC (rev 14449)
@@ -1,4 +1,7 @@
Revision history for Catalyst-Plugin-Session-Store-DBIC
+ - Don't use %ENV for passing data structures to tests.
+ This fixes the tests on Perl 5.18, which stringifies %ENV values
+ immediately. RT#86148
0.12 Thu Aug 4 23:56:00 BST 2011
- Changed a test case to be less picky about the actual text captured
Modified: Catalyst-Plugin-Session-Store-DBIC/trunk/t/05dbic-schema.t
===================================================================
--- Catalyst-Plugin-Session-Store-DBIC/trunk/t/05dbic-schema.t 2013-05-10 12:17:20 UTC (rev 14448)
+++ Catalyst-Plugin-Session-Store-DBIC/trunk/t/05dbic-schema.t 2013-06-14 16:29:17 UTC (rev 14449)
@@ -23,9 +23,9 @@
plan tests => 14;
- $ENV{TESTAPP_DB_FILE} = "$FindBin::Bin/session.db";
+ $TestApp::DB_FILE = "$FindBin::Bin/session.db";
- $ENV{TESTAPP_CONFIG} = {
+ $TestApp::CONFIG = {
name => 'TestApp',
session => {
dbic_class => 'DBICSchema::Session',
@@ -33,7 +33,7 @@
},
};
- $ENV{TESTAPP_PLUGINS} = [qw/
+ $TestApp::PLUGINS = [qw/
Session
Session::State::Cookie
Session::Store::DBIC
@@ -79,4 +79,4 @@
$mech->content_is('ok', 'deleted expired sessions');
# Clean up
-unlink $ENV{TESTAPP_DB_FILE};
+unlink $TestApp::DB_FILE;
Modified: Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/SetupDB.pm
===================================================================
--- Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/SetupDB.pm 2013-05-10 12:17:20 UTC (rev 14448)
+++ Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/SetupDB.pm 2013-06-14 16:29:17 UTC (rev 14449)
@@ -4,7 +4,7 @@
use warnings;
# Create the database
-my $db_file = $ENV{TESTAPP_DB_FILE};
+my $db_file = $TestApp::DB_FILE;
unlink $db_file if -e $db_file;
my $dbh = DBI->connect("dbi:SQLite:$db_file") or die $DBI::errstr;
Modified: Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp/Model/DBICSchema.pm
===================================================================
--- Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp/Model/DBICSchema.pm 2013-05-10 12:17:20 UTC (rev 14448)
+++ Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp/Model/DBICSchema.pm 2013-06-14 16:29:17 UTC (rev 14449)
@@ -6,7 +6,7 @@
use strict;
use warnings;
-our $db_file = $ENV{TESTAPP_DB_FILE};
+our $db_file = $TestApp::DB_FILE;
__PACKAGE__->config(
schema_class => 'TestApp::Schema',
Modified: Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp.pm
===================================================================
--- Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp.pm 2013-05-10 12:17:20 UTC (rev 14448)
+++ Catalyst-Plugin-Session-Store-DBIC/trunk/t/lib/TestApp.pm 2013-06-14 16:29:17 UTC (rev 14449)
@@ -4,7 +4,7 @@
use warnings;
use Catalyst;
-__PACKAGE__->config($ENV{TESTAPP_CONFIG});
-__PACKAGE__->setup(@{ $ENV{TESTAPP_PLUGINS} });
+__PACKAGE__->config($TestApp::CONFIG);
+__PACKAGE__->setup(@{ $TestApp::PLUGINS });
1;
More information about the Catalyst-commits
mailing list