Add specs for convert array problem, and write helper method in spec helper.