Skip to content

Commit

Permalink
Add Rails master to Travis, fix specs for 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nbulaj committed Jan 26, 2018
1 parent 23ee3bd commit ef3d4b1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ gemfile:
- gemfiles/rails_4_2.gemfile
- gemfiles/rails_5_0.gemfile
- gemfiles/rails_5_1.gemfile
- gemfiles/rails_master.gemfile

matrix:
exclude:
- gemfile: gemfiles/rails_5_0.gemfile
rvm: 2.1
- gemfile: gemfiles/rails_5_1.gemfile
rvm: 2.1
- gemfile: gemfiles/rails_master.gemfile
rvm: 2.1
allowed_failures:
- gemfile: gemfiles/rails_5_1.gemfile
- gemfile: gemfiles/rails_master.gemfile
3 changes: 1 addition & 2 deletions gemfiles/rails_5_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ gem "appraisal"
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
gem "sqlite3", :platform => [:ruby, :mswin, :mingw, :x64_mingw]
gem "tzinfo-data", :platforms => [:mingw, :mswin, :x64_mingw]
gem "arel", :github => "rails/arel"
gem "rspec-rails", "~> 3.5"
gem "rspec-rails", "~> 3.7"

gemspec :path => "../"
13 changes: 13 additions & 0 deletions gemfiles/rails_master.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rails", git: 'https://github.com/rails/rails'
gem "arel", git: 'https://github.com/rails/arel'
gem "appraisal"
gem "activerecord-jdbcsqlite3-adapter", platform: :jruby
gem "sqlite3", platform: [:ruby, :mswin, :mingw, :x64_mingw]
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw]
gem "rspec-rails", "~> 3.7"

gemspec :path => "../"
9 changes: 8 additions & 1 deletion spec/requests/endpoints/token_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
it 'respond with correct headers' do
post token_endpoint_url(code: @authorization.token, client: @client)
should_have_header 'Pragma', 'no-cache'
should_have_header 'Cache-Control', 'no-store'

# Rails 5.2 changed headers
if ::Rails::VERSION::MAJOR >= 5 && ::Rails::VERSION::MINOR >= 2
should_have_header 'Cache-Control', 'private, no-store'
else
should_have_header 'Cache-Control', 'no-store'
end

should_have_header 'Content-Type', 'application/json; charset=utf-8'
end

Expand Down

0 comments on commit ef3d4b1

Please sign in to comment.