Refactor some spec files

I did refactoring spec files.
However, behavior of the existing test is not changed.