1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2018-06-27 11:37:19 +00:00
parent cbbe2fab82
commit 80fdfbf809
6 changed files with 69 additions and 30 deletions

View file

@ -159,22 +159,22 @@ end
def test_new_specs
require "yaml"
Dir.chdir(SOURCE_REPO) do
if MSPEC
sh "bundle", "exec", "rspec"
else
versions = YAML.load_file(".travis.yml")
versions = versions["matrix"]["include"].map { |job| job["rvm"] }
versions.delete "ruby-head"
min_version, max_version = versions.minmax
versions = YAML.load_file(".travis.yml")
versions = versions["matrix"]["include"].map { |job| job["rvm"] }
versions.delete "ruby-head"
versions.delete "system"
min_version, max_version = versions.minmax
run_rubyspec = -> version {
command = "chruby #{version} && ../mspec/bin/mspec -j"
sh ENV["SHELL"], "-c", command
}
run_rubyspec[min_version]
run_rubyspec[max_version]
run_rubyspec["trunk"]
end
test_command = MSPEC ? "bundle exec rspec" : "../mspec/bin/mspec -j"
run_test = -> version {
command = "chruby #{version} && #{test_command}"
sh ENV["SHELL"], "-c", command
}
run_test[min_version]
run_test[max_version]
run_test["trunk"]
end
end