diff --git a/lib/sass_spec/test.rb b/lib/sass_spec/test.rb index 854f288215..32cb6dc243 100644 --- a/lib/sass_spec/test.rb +++ b/lib/sass_spec/test.rb @@ -605,17 +605,29 @@ def assert_filename_length!(filename, options) def _extract_error_message(error, options) error_message = "" consume_next_line = false + multiline_error = false error.each_line do |line| if consume_next_line next if line.strip == "" error_message += line break end + if (multiline_error) + error_message += line.rstrip + "\n" + multiline_error = false + consume_next_line = false + break + end if (line =~ /DEPRECATION WARNING/) if line.rstrip.end_with?(":") error_message = line.rstrip + "\n" consume_next_line = true next + elsif line.rstrip.end_with?("Instead of being parsed as") + multiline_error = true + error_message = line.rstrip + "\n" + consume_next_line = true + next else error_message = line break