Skip to content

Commit

Permalink
Check for Plack::Request, not just Plack.
Browse files Browse the repository at this point in the history
Some of these tests were failing with an older Plack installed, which didn't
include Plack::Request.

This should resolve Issue 73 (at least by avoiding the test failures; whether we
actually need to declare a depedency on a newer Plack I don't know yet).
  • Loading branch information
bigpresh committed May 24, 2010
1 parent 62bba93 commit 6b18a45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion t/07_apphandlers/01_base.t
@@ -1,7 +1,7 @@
use Test::More import => ['!pass'];

plan skip_all => "Plack is needed for this test"
unless Dancer::ModuleLoader->load('Plack');
unless Dancer::ModuleLoader->load('Plack::Request');

plan tests => 4;

Expand Down
2 changes: 1 addition & 1 deletion t/07_apphandlers/02_apache2_plack.t
Expand Up @@ -5,7 +5,7 @@ use warnings;
use Test::More import => ['!pass'];

plan skip_all => "Plack is needed for this test"
unless Dancer::ModuleLoader->load('Plack');
unless Dancer::ModuleLoader->load('Plack::Request');

plan tests => 2;

Expand Down
4 changes: 3 additions & 1 deletion t/07_apphandlers/03_psgi_app.t
Expand Up @@ -5,12 +5,14 @@ use Dancer::Config 'setting';
use Dancer::ModuleLoader;

plan skip_all => "Plack is needed to run this test"
unless Dancer::ModuleLoader->load('Plack::Loader');
unless Dancer::ModuleLoader->load('Plack::Request');
plan skip_all => "LWP is needed to run this test"
unless Dancer::ModuleLoader->load('LWP::UserAgent');
plan skip_all => "Test::TCP is needed to run this test"
unless Dancer::ModuleLoader->load('Test::TCP');

Dancer::ModuleLoader->load('Plack::Loader');

my $app = sub {
my $env = shift;
my $request = Dancer::Request->new($env);
Expand Down

0 comments on commit 6b18a45

Please sign in to comment.