parroty / excheck

Property-based testing library for Elixir (QuickCheck style).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: idiomatic approach for managing custom generators?

ornamentist opened this issue · comments

Hi,

I'm creating a number of properties that have the form:

property :something do
for_all {a, b} in {[number,number], [number,number]} do
#...
end
end

Is there an idiomatic way of referencing the generator expression [number,number] for easy reuse across test modules? Maybe the test_helper.exs file? Then I can use:

property :something do
for_all {a, b} in {number_list_2, number_list_2} do
#...
end
end

Thanks