Move functional tests to specs