From: Siraaj Khandkar Date: Wed, 13 Aug 2014 13:39:03 +0000 (-0400) Subject: Make result pipe test more intuitive. X-Git-Tag: 1.0.0~14 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=55182c1b53d889c22703ee5c680a68b54397d612;p=hope.git Make result pipe test more intuitive. --- diff --git a/test/hope_result_SUITE.erl b/test/hope_result_SUITE.erl index 618713d..3c0a6ec 100644 --- a/test/hope_result_SUITE.erl +++ b/test/hope_result_SUITE.erl @@ -35,11 +35,9 @@ groups() -> %% ============================================================================= t_pipe(_Config) -> - A = foo, - Z = qux, Steps = - [ fun (foo) -> {ok, bar}; (X) -> {error, X} end - , fun (bar) -> {ok, baz}; (X) -> {error, X} end - , fun (baz) -> {ok, qux}; (X) -> {error, X} end + [ fun (0) -> {ok, 1}; (X) -> {error, X} end + , fun (1) -> {ok, 2}; (X) -> {error, X} end + , fun (2) -> {ok, 3}; (X) -> {error, X} end ], - {ok, Z} = hope_result:pipe(Steps, A). + {ok, 3} = hope_result:pipe(Steps, 0).