describe "my test case" do
    test_cases_for ["should do something with users", "should do something 
else with users"], do:
       [
           %{username: "Foobar1", likes_to: ["play soccer"]},
           %{username: "Foobar2", likes_to: ["play basketball", "go on a 
trip"]},
           %{username: "Foobar3", likes_to: []},
       ]

    #Loops into test_cases
    test "should do something with users", cases: %{username: username, 
likes_to: likes_to} do
       #Do something with those params
    end


    test "should do something else with users", cases: %{username: username, 
likes_to: likes_to} do
       #Do something with those params
    end
end

I think it would be cool if ExUnit had something like this, isn`t 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/36931be4-2d15-435b-8d64-f9829f6a0dac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to