Skip to content

Instantly share code, notes, and snippets.

@rsslldnphy
Created September 3, 2013 11:11
Show Gist options
  • Save rsslldnphy/6422524 to your computer and use it in GitHub Desktop.
Save rsslldnphy/6422524 to your computer and use it in GitHub Desktop.
Headless testing in teamcity
## add the following to your Gemfile
gem 'headless'
## this should be in features/support
require 'headless'
Before do
unless RUBY_PLATFORM[/darwin/]
headless = Headless.new
headless.start
end
end
@rsslldnphy
Copy link
Author

Thinking about it this will probably break for you locally unless you're using a mac. Is there some better way to tell if we're running on the CI server?

@paul-cuffe
Copy link

Having run this on a non-mac machine this does break the test. To fix this, you just need to run the following command into your terminal:

sudo apt-get install xvfb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment