diff --git a/spec/mspec/tool/sync/sync-rubyspec.rb b/spec/mspec/tool/sync/sync-rubyspec.rb index 2da7f8edb9..48047e013f 100644 --- a/spec/mspec/tool/sync/sync-rubyspec.rb +++ b/spec/mspec/tool/sync/sync-rubyspec.rb @@ -162,12 +162,7 @@ end def test_new_specs require "yaml" Dir.chdir(SOURCE_REPO) do - versions = YAML.load_file(".travis.yml") - versions = if versions.include? "matrix" - versions["matrix"]["include"].map { |job| job["rvm"] } - else - versions["rvm"] - end + versions = YAML.load_file("#{MSPEC_REPO}/.travis.yml").fetch("rvm") versions = versions.grep(/^\d+\./) # Test on MRI min_version, max_version = versions.minmax diff --git a/spec/mspec/tool/tag_from_output.rb b/spec/mspec/tool/tag_from_output.rb index 1802aa9261..43fc4808bc 100755 --- a/spec/mspec/tool/tag_from_output.rb +++ b/spec/mspec/tool/tag_from_output.rb @@ -21,6 +21,10 @@ output.slice_before(NUMBER).select { |number, error_line, *rest| description = error_line.match(ERROR_OR_FAILED).pre_match spec_file = rest.find { |line| line =~ SPEC_FILE } + unless spec_file + warn "Could not find file for:\n#{error_line}" + next + end spec_file = spec_file[SPEC_FILE, 1] prefix = spec_file.index('spec/ruby') spec_file = spec_file[prefix..-1]