Added spec test and modified documentation.