Refactored spec tests.