view release on metacpan or search on metacpan
eg/bmi.psgi view on Meta::CPAN
use strict;
use warnings;
use lib '../lib';
use lib glob '../modules/*/lib/';
use Plack::Builder;
use Plack::Request;
use APISchema::DSL;
use APISchema::Generator::Router::Simple;
use Plack::App::APISchema::Document;
use Plack::App::APISchema::MockServer;
use APISchema::Generator::Markdown;
use JSON qw(decode_json encode_json);
t/APISchema-DSL.t view on Meta::CPAN
package t::APISchema::Generator::Router::Simple;
use lib '.';
use t::test;
use Encode qw(decode_utf8);
sub _require : Test(startup => 1) {
my ($self) = @_;
BEGIN{ use_ok 'APISchema::DSL'; }
}
sub no_global : Tests {
t/APISchema-Generator-Markdown-Formatter.t view on Meta::CPAN
package t::APISchema::Generator::Markdown::Formatter;
use lib '.';
use t::test;
use t::test::fixtures;
use APISchema::Generator::Markdown::Formatter ();
sub _type : Tests {
for my $case (
[{} => 'undefined'],
[{type => 'object'} => '`object`'],
[{type => ['object', 'number']} => '`"object"`|`"number"`'],
t/APISchema-Generator-Markdown.t view on Meta::CPAN
package t::APISchema::Generator::Markdown;
use lib '.';
use t::test;
use t::test::fixtures;
use utf8;
use APISchema::DSL;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'APISchema::Generator::Markdown';
t/APISchema-Generator-Router-Simple.t view on Meta::CPAN
package t::APISchema::Generator::Router::Simple;
use lib '.';
use t::test;
use t::test::fixtures;
use APISchema::Schema;
use Router::Simple;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'APISchema::Generator::Router::Simple';
}
t/APISchema-JSON.t view on Meta::CPAN
package t::APISchema::JSON;
use lib '.';
use t::test;
sub _require : Test(startup => 1) {
my ($self) = @_;
BEGIN{ use_ok 'APISchema::JSON'; }
}
sub _encode_json_canonical : Tests {
is APISchema::JSON::encode_json_canonical({b => 2, c => 3, a => 1}), '{"a":1,"b":2,"c":3}', 'keys are sorted';
t/APISchema-Resource.t view on Meta::CPAN
package t::APISchema::Resource;
use lib '.';
use t::test;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'APISchema::Resource';
}
sub instantiate : Tests {
my $resource = APISchema::Resource->new(
t/APISchema-Route.t view on Meta::CPAN
package t::APISchema::Route;
use lib '.';
use t::test;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'APISchema::Route';
}
sub instantiate : Tests {
my $route = APISchema::Route->new(
t/APISchema-Schema.t view on Meta::CPAN
package t::APISchema::Schema;
use lib '.';
use t::test;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'APISchema::Schema';
}
sub instantiate : Tests {
my $schema = APISchema::Schema->new;
t/APISchema-Validator.t view on Meta::CPAN
package t::Plack::Middleware::APISchema::ResponseValidator;
use lib '.';
use t::test;
use t::test::fixtures;
use JSON::XS qw(encode_json);
sub _require : Test(startup => 1) {
use_ok 'APISchema::Validator';
}
sub instantiate : Tests {
subtest 'For request' => sub {
t/APISchema.t view on Meta::CPAN
package t::APISchema;
use lib '.';
use t::test;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'APISchema';
}
sub version : Tests {
cmp_ok $APISchema::VERSION, '>', 0, 'has positive version';
t/Plack-App-APISchema-Document.t view on Meta::CPAN
package t::Plack::App::APISchema::Document;
use lib '.';
use t::test;
use t::test::fixtures;
use t::test::InheritedDocument;
use Plack::Test;
use HTTP::Request::Common;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'Plack::App::APISchema::Document';
t/Plack-App-APISchema-MockServer.t view on Meta::CPAN
package t::Plack::App::APISchema::MockServer;
use lib '.';
use t::test;
use t::test::fixtures;
use Plack::Test;
use HTTP::Request::Common;
sub _require : Test(startup => 1) {
my ($self) = @_;
use_ok 'Plack::App::APISchema::MockServer';
}
t/Plack-Middleware-APISchema-RequestValidator.t view on Meta::CPAN
package t::Plack::Middleware::APISchema::RequestValidator;
use lib '.';
use t::test;
use t::test::fixtures;
use Plack::Test;
use HTTP::Request::Common;
use HTTP::Status qw(:constants);
use JSON::XS qw(encode_json);
sub _require : Test(startup => 1) {
my ($self) = @_;
t/Plack-Middleware-APISchema-ResponseValidator.t view on Meta::CPAN
package t::Plack::Middleware::APISchema::ResponseValidator;
use lib '.';
use t::test;
use t::test::fixtures;
use Plack::Test;
use Plack::Request;
use HTTP::Request::Common;
use JSON::XS qw(encode_json);
sub _require : Test(startup => 1) {
my ($self) = @_;
package t::test;
use strict;
use warnings;
use Path::Class;
use lib file(__FILE__)->dir->parent->subdir('lib')->stringify;
use lib lib => 't/lib' => glob 'modules/*/lib';
sub import {
my ($class) = @_;
strict->import;
warnings->import;
my ($package, $file) = caller;