refactor how to write view spec refs #632