Example code from http://simonsmith.io/headless-testing-with-jasmine-phantomjs-and-grunt