/rebar_proper_plugin

PropEr plugin for Rebar

Primary LanguageErlangMIT LicenseMIT

#rebar_proper_plugin#

Copyright (c) 2012 Andrzej Śliwa.

Version: 0.1

rebar plus proper

rebar_proper_plugin is a simple rebar plugin for handling PropEr tests.

Build Status

Main features:

  • run all prop_* tests
  • check all specs of module or explicit functions in

Note: This is a work in progress, see the TODO for more informations on what still need to be done.

License

See LICENSE file for licensing information.

Installation

Download the sources from our Github repository

Important!: Plugin tested with rebar 2.0.0 R15B02 20121106_155240 git 2.0.0-237-ga2fb8fd

To generate doc, run 'make doc'.

To use plugin:Add it to own '~/.erlang' file

code:add_pathz("/Users/andrzejsliwa/.erlang_tools/deps/proper/ebin").

Add it to own your rebar config

%% define deps repo of plugin
{deps, [
...
{rebar_proper_plugin, ".*", {git, "git://github.com/andrzejsliwa/rebar_proper_plugin.git", {branch, "master"}}}
]}.
%% define plugin usage
{plugins, [rebar_proper_plugin]}.
%% define PropEr options
{proper_opts, [{numtests, 200}]}.
%% define function to check (MFA format)
{proper_check_spec, [{example, is_empty, 1}]}.
%% or define just module {proper_check_spec, [example]}.

Basic usage

The basic usage of rebar_proper_plugin (after 'rebar compile') is:

$ rebar proper
Testing example:pop/1
........................................................................................................................................................................................................
OK: Passed 200 test(s).
...

Contribute

For issues, comments or feedback please create an issue.

Notes for developers

If you want to contribute patches or improve the doc, you will need to build hackney using the rebar.dev.config file. It can also be built using the Makefile:

$ make dev       ; # compile & get deps
$ make dev_clean ; # clean all files

##Modules##

rebar_proper_plugin