refact spec test