changed CHANGELOG.md
 
@@ -1,3 1,13 @@
1
0.5.2
2
------
3
#### Changes
4
* Fix umbrella test count (#34).
5
6
0.5.1
7
------
8
#### Enhancements
9
* Add ex_doc for documentation (#32).
10
1
11
0.5.0
2
12
------
3
13
#### Changes
changed README.md
 
@@ -1,4 1,4 @@
1
- # ExCheck [![Build Status](https://secure.travis-ci.org/parroty/excheck.png?branch=master "Build Status")](http://travis-ci.org/parroty/excheck) [![Coverage Status](http://img.shields.io/coveralls/parroty/excheck.svg)](https://coveralls.io/r/parroty/excheck)
1
# ExCheck [![Build Status](https://secure.travis-ci.org/parroty/excheck.png?branch=master "Build Status")](http://travis-ci.org/parroty/excheck) [![Coverage Status](http://img.shields.io/coveralls/parroty/excheck.svg)](https://coveralls.io/r/parroty/excheck) [![Inline docs](http://inch-ci.org/github/parroty/excheck.svg?branch=master&style=flat)](http://inch-ci.org/github/parroty/excheck)
2
2
3
3
Property-based testing for Elixir (QuickCheck style).
4
4
It uses Erlang's [triq](https://github.com/krestenkrab/triq) library for underlying checking engine, and ExCheck's modules provide wrapper macros for ExUnit tests.
changed hex_metadata.config
 
@@ -15,4 15,4 @@
15
15
{<<"maintainers">>,[<<"parroty">>]}.
16
16
{<<"name">>,<<"excheck">>}.
17
17
{<<"requirements">>,[]}.
18
- {<<"version">>,<<"0.5.1">>}.
18
{<<"version">>,<<"0.5.2">>}.
changed lib/excheck/error_agent.ex
 
@@ -25,6 25,11 @@ defmodule ExCheck.ErrorAgent do
25
25
end)
26
26
end
27
27
28
@doc "Clears all errors stored by this agent."
29
def clear_errors(agent) do
30
agent |> Agent.update(fn(_) -> %{} end)
31
end
32
28
33
@doc "Stops the agent."
29
34
def stop(agent) do
30
35
Agent.stop(agent)
changed lib/excheck/formatter.ex
 
@@ -31,9 31,13 @@ defmodule ExCheck.Formatter do
31
31
end
32
32
33
33
defp update_tests_counter(tests_counter) when is_integer(tests_counter) do
34
- tests_counter ExCheck.IOServer.total_tests
34
total_tests = tests_counter ExCheck.IOServer.total_tests
35
ExCheck.IOServer.reset_test_count
36
total_tests
35
37
end
36
38
defp update_tests_counter(tests_counter) when is_map(tests_counter) do
37
- %{tests_counter | test: tests_counter.test ExCheck.IOServer.total_tests}
39
total_tests = %{tests_counter | test: tests_counter.test ExCheck.IOServer.total_tests}
40
ExCheck.IOServer.reset_test_count
41
total_tests
38
42
end
39
43
end
changed lib/excheck/io_server.ex
 
@@ -34,6 34,11 @@ defmodule ExCheck.IOServer do
34
34
@server |> GenServer.call(:total_tests)
35
35
end
36
36
37
@doc "Resets the test count."
38
def reset_test_count do
39
@server |> GenServer.call(:reset_test_count)
40
end
41
37
42
@doc "Returns all error loggings from property tests"
38
43
def errors do
39
44
@server |> GenServer.call(:errors)
 
@@ -65,6 70,10 @@ defmodule ExCheck.IOServer do
65
70
def handle_call(:total_tests, _from, state = %State{tests: tests}) do
66
71
{:reply, tests, state}
67
72
end
73
def handle_call(:reset_test_count, _from, state = %State{agent: agent}) do
74
agent |> ErrAgent.clear_errors
75
{:reply, :ok, %State{state | tests: 0}}
76
end
68
77
def handle_call(:errors, _from, state = %State{agent: agent}) do
69
78
response = ErrAgent.errors(agent)
70
79
{:reply, response, state}
 
@@ -124,7 133,7 @@ defmodule ExCheck.IOServer do
124
133
state
125
134
end
126
135
def handle_output('~nRan ~p tests~n', [amount], _from, state) do
127
- %State{state | tests: state.tests amount}
136
%State{state | tests: state.tests amount - 1}
128
137
end
129
138
def handle_output('Testing ~p' _rest, _value_list, _from, state) do
130
139
# Filter this statement out, output shows up in ExUnit anyway
changed mix.exs
 
@@ -6,7 6,7 @@ defmodule ExCheck.Mixfile do
6
6
name: "ExCheck",
7
7
source_url: "https://github.com/parroty/ExCheck.git",
8
8
homepage_url: "https://github.com/parroty/ExCheck.git",
9
- version: "0.5.1",
9
version: "0.5.2",
10
10
elixir: "~> 1.0",
11
11
deps: deps,
12
12
description: description,
 
@@ -26,8 26,9 @@ defmodule ExCheck.Mixfile do
26
26
def deps do
27
27
[
28
28
{:excoveralls, "~> 0.5", only: :test},
29
- {:triq, github: "triqng/triq"},
30
- {:ex_doc, "~> 0.12", only: :dev}
29
{:triq, github: "triqng/triq", only: [:dev, :test]},
30
{:ex_doc, "~> 0.12", only: :dev},
31
{:inch_ex, only: :docs}
31
32
]
32
33
end