Fixing specs for looping over arrays