@@ -11,21 +11,19 @@ defmodule PointingParty.VoteCalculatorTest do
11
11
metas: list_of ( points_map , length: 1 )
12
12
} )
13
13
14
- user = nonempty ( map_of ( string ( :alphanumeric ) , metas_map ) )
15
- [ user: user ]
14
+ users = nonempty ( map_of ( string ( :alphanumeric ) , metas_map ) )
15
+ [ users: users ]
16
16
end
17
17
18
- property "winning value is a list or a integer" , % { user: user } do
19
- check all users <- user do
18
+ property "winning value is a list or a integer" , % { users: users } do
19
+ check all users <- users do
20
20
{ _event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
21
21
assert is_list ( winner ) || is_integer ( winner )
22
22
end
23
23
end
24
24
25
- property "tie when winning value is a list, winner when winning value is an integer" , % {
26
- user: user
27
- } do
28
- check all users <- user do
25
+ property "tie when winning value is a list, winner when winning value is an integer" , % { users: users } do
26
+ check all users <- users do
29
27
{ event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
30
28
31
29
cond do
@@ -38,8 +36,8 @@ defmodule PointingParty.VoteCalculatorTest do
38
36
end
39
37
end
40
38
41
- property "the winning value is not more than the highest point value" , % { user: user } do
42
- check all users <- user do
39
+ property "the winning value is not more than the highest point value" , % { users: users } do
40
+ check all users <- users do
43
41
{ _event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
44
42
45
43
max_vote =
@@ -57,8 +55,8 @@ defmodule PointingParty.VoteCalculatorTest do
57
55
end
58
56
end
59
57
60
- property "when the winner is a list of two sorted values" , % { user: user } do
61
- check all users <- user do
58
+ property "when the winner is a list of two sorted values" , % { users: users } do
59
+ check all users <- users do
62
60
{ _event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
63
61
64
62
if is_list ( winner ) do
0 commit comments