fixed RSpec deprecations

Additionally there's some whitespace cleanup in spec file.