Skip to content
forked from yowcow/stubby

A stub server and request recorder for testing

License

Notifications You must be signed in to change notification settings

voyagegroup/stubby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

stubby

A stub http server and request body recorder.

Build

$ rebar3 compile

How to use

In rebar.config deps, have:

{stubby, {git, "git://github.com/yowcow/stubby", {branch, "master}}}

In testing, e.g., common tests, have:

init_per_suite(Config) ->
    Url = stubby:start(),
    [{url, Url} | Config].

end_per_suite(_) ->
    ok = stubby:stop().

(See src/stubby.erl for more options starting up a server)

In a testcase, make a request to stubby url, then get the most recent request body with:

{ok, Body} = stubby:get_recent()

See also

About

A stub server and request recorder for testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 98.6%
  • Makefile 1.4%