Refactor spec with shared examples and check links