No description or website provided.
Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
t
README.pod

README.pod

NAME

Test::Mock::PSGI

SYNOPSIS

  use Test::Mock::PSGI;
  use LWP::Simple;
  
  my $mock = Test::Mock::PSGI->new;
  $mock->maps(
      'http://www.google.com/' => sub {
          return [ 200, [], [ 'gooogle' ] ]
      },
  );
  
  {
      my $session = $mock->session;
      is(get('http://www.google.com/'), 'gooogle');
      ok($session->verify);
  };
  
  {
      my $session = $mock->session;
      ok(! get('http://www.amazon.com/'));
      ok(! $session->verify);
  };

SEE ALSO

Test::Mock::LWP

Test::HTTP::Server::Simple