1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

check .travis.yml ruby verison matches pages

https://github.com/github/choosealicense.com/pull/472#issuecomment-270048688

very rough, naive, probably bad implementation
This commit is contained in:
Mike Linksvayer 2017-01-02 21:28:12 -08:00
parent d413d0a334
commit 7b4890ddf6

View 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 "#{ci_config_file} and pages ruby versions" do
it 'do not match' do
msg = "(#{ci_ruby_version}) != (#{pages_ruby_version})"
expect(ci_ruby_version).to eql(pages_ruby_version), msg
end
end
end