Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

C::M::Fastがないときとlocalにmemcachedがないときはスキップ

  • Loading branch information...
commit 96f8231ad47680f1b4fb3688d8b13da92f15486f 1 parent 91d137b
Atsushi Kobayashi nekokak authored

Showing 1 changed file with 12 additions and 4 deletions. Show diff stats Hide diff stats

  1. +12 4 t/030_plugin/session/store/memcached.t
16 t/030_plugin/session/store/memcached.t
@@ -3,12 +3,20 @@ use Test::More;
3 3 use Kamui::Web::Context;
4 4 use Mock::Container;
5 5 use Mock::Web::Handler;
6   -use Cache::Memcached::Fast;
7 6
8 7 BEGIN {
9   - my $memd = Cache::Memcached::Fast->new({servers => ['127.0.0.1:11211']});
10   - my $version = $memd->server_versions;
11   - plan skip_all => 'can not access local memcached' unless scalar(keys %$version);
  8 + eval "use Cache::Memcached::Fast";
  9 + plan skip_all => 'needs Cache::Memcached::Fast for testing' if $@;
  10 +
  11 + my $memd = Cache::Memcached::Fast->new(
  12 + {
  13 + servers => [qw/127.0.0.1:11211/],
  14 + }
  15 + );
  16 +
  17 + unless (keys %{$memd->server_versions}) {
  18 + plan skip_all => 'memcached server missing. skip testing';
  19 + }
12 20 };
13 21
14 22 my $plugins = [qw/Session/];

0 comments on commit 96f8231

Please sign in to comment.
Something went wrong with that request. Please try again.