test/parse_helper.rb in parser-2.1.0.pre1 vs test/parse_helper.rb in parser-2.1.0.pre2
- old
+ new
@@ -127,13 +127,16 @@
"(#{version}) emits a single diagnostic, not\n" \
"#{@diagnostics.map(&:render).join("\n")}"
emitted_diagnostic = @diagnostics.first
- level, kind, substitutions = diagnostic
- message = Parser::ERRORS[kind] % substitutions
+ level, reason, arguments = diagnostic
+ arguments ||= {}
+ message = Parser::MESSAGES[reason] % arguments
assert_equal level, emitted_diagnostic.level
+ assert_equal reason, emitted_diagnostic.reason
+ assert_equal arguments, emitted_diagnostic.arguments
assert_equal message, emitted_diagnostic.message
parse_source_map_descriptions(source_maps) \
do |begin_pos, end_pos, map_field, ast_path, line|