Refactor history spec