Skip to content

Instantly share code, notes, and snippets.

View e2's full-sized avatar

Cezary Baginski e2

View GitHub Profile
@e2
e2 / .travis.yml
Created February 28, 2012 11:07
Running PhantomJS tests on Travis
language: ruby
rvm:
- 1.9.3
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- bundle exec rackup ./test/config.ru 2>/dev/null &
- sleep 2
# encoding: utf-8
def test(a,b)
begin
result = ('テ'.encode(a) << 'テ'.encode(b)).encode('utf-8')
rescue Encoding::CompatibilityError
result = "FAILED!"
end
p "Example: #{a} + #{b}: #{result}"
end