Refactored hash specs to use expect syntax
Refactored array specs in the same manner