Moved tests from spec to tests