language: ruby
rvm:
  - '2.1.2'
  - '2.1.1'
  - '2.1.0'
  - '2.0.0'
  - '1.9.3'
gemfile:
  - gemfiles/rails_3.2.21.gemfile
  - gemfiles/rails_4.0.12.gemfile
  - gemfiles/rails_4.1.8.gemfile
  - gemfiles/rails_4.2.0.rc1.gemfile
addons:
  postgresql: '9.3'
before_script:
  - psql -c 'create database travis_ci_test;' -U postgres
  - cp spec/dummy/config/database.travis.yml spec/dummy/config/database.yml
script: 'bundle exec rspec spec'

language: ruby
rvm:
  - '2.1.2'
  - '2.1.1'
  - '2.1.0'
  - '2.0.0'
  - '1.9.3'
gemfile:
  - gemfiles/rails_3.2.21.gemfile
  - gemfiles/rails_4.0.12.gemfile
  - gemfiles/rails_4.1.8.gemfile
  - gemfiles/rails_4.2.0.rc1.gemfile
addons:
  postgresql: '9.3'
before_script:
  - psql -c 'create database travis_ci_test;' -U postgres
  - cd spec/dummy/
  - cp config/database.travis.yml config/database.yml
  - bundle exec rake db:schema:load
  - cd ../../
script: 'bundle exec rspec spec'

Load and prepare DB before test
Load and prepare DB before test

The bin/rake db:migrate task runs the migrations and then dumps the
structure of the database to a file called db/schema.rb. This structure
allows you to restore your database using the bin/rake db:schema:load
task if you wish, which is better than running all the migrations on a
large project again!

Source:
http://www.42.mach7x.com/2013/10/03/dbmigrate-or-dbschemaload-for-rails-
project-with-many-migations/
