introduce spec helper and refactor tests to pretty style