Data providers for Rails testing

: you define a nested array/hash of arguments in one method, then loop a single test through it, swapping the arguments on each pass. It's a concise way to repeatedly test the the same event with different parameters.

The only solution I have found thus far is to replicate the concept manually, inside a single test:

However, with Rails I find a combination of RSpec, FactoryGirl and Faker/ffaker easier to use. I also don't create a “data provider” and test against this matrix, but specify the behaviour (whether it is Test::Unit or RSpec), like so: