Improve test cases in specs