Currently if you do:
ExUnit.Case.register_attribute(__MODULE__, :foo)
@foo :bar
describe "outer" do
test "inner 1", %{registered: %{foo: foo}} do
IO.inspect(foo)
end
test "inner 2", %{registered: %{foo: foo}} do
IO.inspect(foo)
end
end
The result will print `:bar` when "outer inner 1" runs and `nil` when "outer inner 2" runs because the test module attribute values reset after each `test/2`
It would be great if the test module attributes declared above a `describe` could be inherited by all tested `test/2`s.
If there isn't opposition to this idea I can work on implementing it.