lib/jasmine-phantom/tasks.rake in jasmine-phantom-0.0.2 vs lib/jasmine-phantom/tasks.rake in jasmine-phantom-0.0.3

- old
+ new

@@ -10,9 +10,12 @@ # omg config.jasmine_port finds a new unused port every time! port = config.instance_variable_get :@jasmine_server_port script = File.join File.dirname(__FILE__), 'run-jasmine.js' - sh "phantomjs #{script} http://localhost:#{port}" + + pid = Process.spawn "phantomjs #{script} http://localhost:#{port}" + _, status = Process.waitpid2 pid + exit(1) unless status.success? end end end