Refactoring rspec for poltergeist/phantomjs usage