-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Hello. First of all, thanks for the great gem!
What do you think of one more way to define the matrix?
where(a: [1,2,3], b: [4,5,6]) do
[
[5, 6, 7], # 1+4, 2+4, 3+4
[6, 7, 8], # 1+5, 2+5, 3+5
[7, 8, 9] # 1+6, 2+6, 3+6
]
end
with_them do
specify { expect(a+b).to eq(result) } # the block value is implicitly called `result`
end
Essentially, a way to define just combinations and then all the possible results for all the combinations.
I believe it would be useful in a lot of cases.
If you like it, I can try implementing it.
sue445
Metadata
Metadata
Assignees
Labels
No labels