sudo: false
language: ruby
rvm:
  - "2.2.3"
script: bundle exec rake db:create db:migrate spec cucumber RAILS_ENV=test
addons:
  postgresql: "9.3"
before_script:
  - psql -c 'create database foosball_test;' -U postgres
  - cp config/database.yml.travis config/database.yml

sudo: required
language: ruby
services:
  - docker
before_install:
  - curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin
  - docker-compose build
  - docker-compose run shell bundle exec rake test RAILS_ENV=test

Switch CI to use docker.
Switch CI to use docker.

Reference: http://docs.travis-ci.com/user/docker
