I upgraded the version of elixir from 1.7.4 to 1.15 and now I am trying to run MIX_ENV=test mix test and I keep getting an error module ExUnitProperties is not loaded and could not be found My mix.exs has {:stream_data, "~> 0.1", only: :test, runtime: false}. I've tried upgrading stream_data to the latest version but no avail.
Here's what I've tried already (MIX_ENV=test):
mix deps.cleanmix compile --forcemix deps.treeshows├── stream_data ~> 0.1 (Hex package)
mix.exs has:
defp elixirc_paths(:test), do: ["lib", "test/support", "test/fixtures"]
The full error is:
error: module ExUnitProperties is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module
test/support/generators.ex:4: Ab.Generators (module)
generators.ex is:
defmodule Ab.Generators do
@moduledoc "Generators to use for property testing"
use ExUnitProperties
alias Ab.SafeTimex
def datetime do
ExUnitProperties.gen all(
year <- StreamData.member_of(1990..2030),
month <- StreamData.member_of(1..12),
day <- StreamData.member_of(1..31),
hour <- StreamData.member_of(0..23),
minute <- StreamData.member_of(0..59),
second <- StreamData.member_of(0..59)
) do
NaiveDateTime.new(year, month, day, hour, minute, second)
end
|> StreamData.filter(&match?({:ok, _}, &1))
|> StreamData.map(&elem(&1, 1))
|> StreamData.map(&SafeTimex.to_datetime(&1, :utc))
end
end
Any ideas or suggestions? Thank you!
So I think I fixed the issue by adding
stream_datato theapplicationstruct inmix.exsnow I need to research what that did :) The weird part is prior to upgrading to 1.15 it doesn't seem like that was necessary.