diff --git a/test/examples/simple_numbers_test.exs b/test/examples/simple_numbers_test.exs index 8c0f156..b597f20 100644 --- a/test/examples/simple_numbers_test.exs +++ b/test/examples/simple_numbers_test.exs @@ -75,13 +75,17 @@ defmodule Strom.Examples.SimpleNumbersTest do %{first: [1, 2, 3], second: [10, 20, 30]} |> Composite.call(round_robin) - case Enum.to_list(mixed) do - [1 | rest] -> - assert rest == [10, 2, 20, 3, 30] - - [10 | rest] -> - assert rest == [1, 20, 2, 30, 3] - end + mixed + |> Enum.chunk_every(2) + |> Enum.each(fn [first, second] -> + case first > second do + true -> + assert div(first, second) == 10 + + false -> + assert div(second, first) == 10 + end + end) Composite.stop(round_robin) end