unless ENV.include?('CI') ENV['DISPLAY'] = ':99' pid = Process.spawn('Xvfb :99 -ac', out: '/dev/null', err: '/dev/null') at_exit { Process.kill(:SIGINT, pid) } end