View Source pact (pact_erlang v0.2.1)
Summary
Functions
Stops pact server
Creates a mock server with the given interaction details Returns its port for running pact consumer tests
Starts a new pact server and returns its pid Returns old instance's pid in case cleanup was not done correctly
Verifies Writes pact file and also finally cleanups
writes pact to the default directory path
./pacts
writes pact to the given directory path
Types
-type consumer() :: binary().
-type pact_interaction_details() :: map().
-type pact_mock_server_port() :: integer().
-type pact_pid() :: pid().
-type provider() :: binary().
Functions
-spec cleanup(pact_pid()) -> ok.
-spec interaction(pact_pid(), pact_interaction_details()) -> {ok, pact_mock_server_port()}.
-spec verify(pact_pid()) -> {ok, matched} | {error, not_matched}.
-spec write(pact_pid()) -> ok.
./pacts
-spec write(pact_pid(), binary()) -> ok.