Testing multiple conditions

0 views
Skip to first unread message

codeToNowhere

unread,
Jul 14, 2010, 8:55:37 AM7/14/10
to jspec
I've put together a simple project to try out jspec and while it's all
seems to be going ok so far, I feel like I'm doing something wrong
with in the spec files. You can see the code here

http://github.com/rlayte/horizontal_lists

All it does is take one long list and splits it up into a specified
number of smaller lists - the idea being you can then position these
horizontally without losing the vertical ordering. The problem is that
to test lists with 2, 3, 4, etc columns I'm having to create lots of
assertions in my tests. This seems wrong, but I can't think of a way
round it without duplicating the same logic from my js into my tests,
which obviously would defeat the point.

Is there a way to achieve what I'm attempting without making
assertions for each case?
Reply all
Reply to author
Forward
0 new messages