@@ -11,21 +11,19 @@ defmodule PointingParty.VoteCalculatorTest do
1111 metas: list_of ( points_map , length: 1 )
1212 } )
1313
14- user = nonempty ( map_of ( string ( :alphanumeric ) , metas_map ) )
15- [ user: user ]
14+ users = nonempty ( map_of ( string ( :alphanumeric ) , metas_map ) )
15+ [ users: users ]
1616 end
1717
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
2020 { _event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
2121 assert is_list ( winner ) || is_integer ( winner )
2222 end
2323 end
2424
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
2927 { event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
3028
3129 cond do
@@ -38,8 +36,8 @@ defmodule PointingParty.VoteCalculatorTest do
3836 end
3937 end
4038
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
4341 { _event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
4442
4543 max_vote =
@@ -57,8 +55,8 @@ defmodule PointingParty.VoteCalculatorTest do
5755 end
5856 end
5957
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
6260 { _event , winner } = PointingParty.VoteCalculator . calculate_votes ( users )
6361
6462 if is_list ( winner ) do
0 commit comments