language: ruby
sudo: false
rvm:
  - 2.0.0
  - 2.1
  - 2.2
  - ruby-head
gemfile:
  - gemfiles/rails_4.0.gemfile
  - gemfiles/rails_4.1.gemfile
  - gemfiles/rails_4.2.gemfile
  - gemfiles/rails_edge.gemfile
matrix:
  allow_failures:
    - rvm: ruby-head
    - gemfile: gemfiles/rails_edge.gemfile
    # https://github.com/rspec/rspec-rails/pull/1264
    - rvm: 2.2
      gemfile: gemfiles/rails_4.0.gemfile

language: ruby
sudo: false
rvm:
  - 2.0.0
  - 2.1
  - 2.2
  - ruby-head
gemfile:
  - gemfiles/rails_4.0.gemfile
  - gemfiles/rails_4.1.gemfile
  - gemfiles/rails_4.2.gemfile
  - gemfiles/rails_edge.gemfile
matrix:
  allow_failures:
    - rvm: ruby-head
    - gemfile: gemfiles/rails_edge.gemfile
    # https://github.com/rspec/rspec-rails/pull/1264
    - rvm: 2.2
      gemfile: gemfiles/rails_4.0.gemfile
  exclude:
    # Rails 5 requires to run on Ruby 2.2.0 or newer.
    - rvm: 2.0.0
      gemfile: gemfiles/rails_edge.gemfile
    - rvm: 2.1
      gemfile: gemfiles/rails_edge.gemfile

Exclude Ruby 2.0.0 and 2.1 when Rails edge is used
Exclude Ruby 2.0.0 and 2.1 when Rails edge is used
