Question

Whilst practising the Check Out Kata with MSpec I wanted to remove the duplication in my specs the same way that you would add a RowTest in NUnit, but I couldn't figure out how.

Has anyone tried anything similiar, or would you consider such an approach an anti-pattern in an Context/Observation framework such as MSpec?

Was it helpful?

Solution

MSpec doesn't support the RowTest concept known from other frameworks like NUnit and MbUnit.

There's limited support for reusing specifications (the Its) with behaviors, i.e. Behaves_like<TBehavior> but that's not entirely the same as a RowTest.

I generally discourage forcing MSpec to handle lots of different data points as you need to with your code kata. There are better tools out there to handle such situations, like the one you mentioned (NUnit).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top