Skip to content

Commit

Permalink
Skip examples for SyntaxError extensions on Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 2, 2022
1 parent 8abf9e6 commit d55d1a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/syntax_suggest/unit/api_spec.rb
Expand Up @@ -67,6 +67,8 @@ def fake_error.message

error = SyntaxError.new("#{fixtures_dir.join("this_project_extra_def.rb.txt")}:1 ")

skip if error.respond_to?(:path)

require "syntax_suggest/core_ext"

expect(error.detailed_message(highlight: true)).to include(SyntaxSuggest::DisplayCodeWithLineNumbers::TERMINAL_HIGHLIGHT)
Expand All @@ -78,6 +80,8 @@ def fake_error.message

error = SyntaxError.new("#{fixtures_dir.join("this_project_extra_def.rb.txt")}:1 ")

skip if error.respond_to?(:path)

require "syntax_suggest/core_ext"

expect(error.detailed_message(syntax_suggest: true)).to_not eq(error.detailed_message(syntax_suggest: false))
Expand Down

0 comments on commit d55d1a7

Please sign in to comment.