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.
        

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/db59da0f-64bd-4079-aeb0-0249ddc54066%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to