mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 04:40:09 +01:00
Merge pull request #473 from github/ci-ruby-version-test
check .travis.yml ruby verison matches pages
This commit is contained in:
commit
8dd25de01f
21
spec/ci_ruby_version_spec.rb
Normal file
21
spec/ci_ruby_version_spec.rb
Normal file
@ -0,0 +1,21 @@
|
||||
require 'json'
|
||||
require 'open-uri'
|
||||
require 'spec_helper'
|
||||
require 'yaml'
|
||||
|
||||
describe 'ci ruby version' do
|
||||
pages_versions = JSON.parse(open('https://pages.github.com/versions.json').read)
|
||||
pages_ruby_version = pages_versions['ruby']
|
||||
|
||||
ci_config_file = '.travis.yml'
|
||||
|
||||
ci_config = YAML.load_file(ci_config_file)
|
||||
ci_ruby_version = ci_config['rvm'][0]
|
||||
|
||||
context "in #{ci_config_file} and pages ruby version" do
|
||||
it 'match' do
|
||||
msg = "#{ci_ruby_version} != #{pages_ruby_version}; please add a commit bumping in #{ci_config_file}"
|
||||
expect(ci_ruby_version).to eql(pages_ruby_version), msg
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user