--- a/test/rps3_tests.erl Mon Mar 03 20:08:31 2014 +0900
+++ b/test/rps3_tests.erl Mon Mar 03 20:22:21 2014 +0900
-include_lib("eunit/include/eunit.hrl").
- ?assertEqual(length(rps3:get_hands()), 3).
+ ?assertEqual(3, length(rps3:get_hands())).
- ?assertEqual(rps3:winning_hand([rock, paper]), paper),
- ?assertEqual(rps3:winning_hand([paper, scissors]), scissors),
- ?assertEqual(rps3:winning_hand([scissors, rock]), rock),
- ?assertEqual(rps3:winning_hand([rock, rock, rock]), rock),
- ?assertEqual(rps3:winning_hand([rock, paper, scissors]), undefined),
- ?assertEqual(rps3:winning_hand([rock, paper, paper]), paper),
- ?assertEqual(rps3:winning_hand([rock, rock, paper]), paper).
+ ?assertEqual(paper, rps3:winning_hand([rock, paper])),
+ ?assertEqual(scissors, rps3:winning_hand([paper, scissors])),
+ ?assertEqual(rock, rps3:winning_hand([scissors, rock])),
+ ?assertEqual(rock, rps3:winning_hand([rock, rock, rock])),
+ ?assertEqual(undefined, rps3:winning_hand([rock, paper, scissors])),
+ ?assertEqual(paper, rps3:winning_hand([rock, paper, paper])),
+ ?assertEqual(paper, rps3:winning_hand([rock, rock, paper])).