diff options
Diffstat (limited to 'spec/mspec/tool/tag_from_output.rb')
-rwxr-xr-x | spec/mspec/tool/tag_from_output.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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] |