We have a workflow need to be tested. So there are so many branches (pathes) need to test Now we using shoulda contextual test
like this:
context "workflow one" do
setup do
#do something
end
context "branch 1 succuess" do
should "something" do
end
context "branch 2 succuess" do
should "something" do
end
context ...
end
end
context "branch 1 fail" do
should "something" do
end
context ...
end
end
You know it will be very messy. Do you have good solution?