Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

notbenh/Hoax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME

Hoax - a quick API 'pattern' to allow for mock-services

SYNOPSIS

First we need to build a package to define the service:

package Hoax::SomePkg;
use strict;
use warnings;
sub kitten { return { kitten => 'cute' } };

The key here it to include it in the 'Hoax' namespace.

response_status_is [GET => '/SomePkg/kitten'], 200, qq{GET /SomePkg/kitten is cute};

my $expect = <<END;
{
   "kitten" : "cute"
}
END 
response_content_is [GET => '/SomePkg/kitten'], $expect, qq{reply is correct JSON};

About

A quick moc API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published