Skip to content

Commit

Permalink
Merge pull request #3043 from rspec/fix-syntax-suggest-spec
Browse files Browse the repository at this point in the history
Fix syntax suggest spec
  • Loading branch information
JonRowe committed Jun 27, 2023
2 parents 218349e + ef6e775 commit 8158970
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions spec/integration/spec_file_load_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,28 @@ def foo
Failure/Error: __send__(method, file)
EOS

expect(formatted_output).to include unindent(<<-EOS)
SyntaxError:
--> ./tmp/aruba/broken_file.rb
Unmatched keyword, missing `end' ?
1 class WorkInProgress
> 2 def initialize(arg)
4 end
5 end
EOS
if RUBY_VERSION.to_f > 3.2
expect(formatted_output).to include unindent(<<-EOS)
SyntaxError:
--> ./tmp/aruba/broken_file.rb
Unmatched keyword, missing `end' ?
1 class WorkInProgress
> 2 def initialize(arg)
3 def foo
4 end
5 end
EOS
else
expect(formatted_output).to include unindent(<<-EOS)
SyntaxError:
--> ./tmp/aruba/broken_file.rb
Unmatched keyword, missing `end' ?
1 class WorkInProgress
> 2 def initialize(arg)
4 end
5 end
EOS
end
expect(formatted_output).to include "./tmp/aruba/broken_file.rb:5: syntax error"

expect(formatted_output).to include unindent(<<-EOS)
Expand Down

0 comments on commit 8158970

Please sign in to comment.