-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests with prism parser #53
Run tests with prism parser #53
Conversation
5475d51
to
f6a2a34
Compare
@@ -282,7 +282,7 @@ def some_method | |||
it_behaves_like 'mutable objects', %("\#{a}") | |||
end | |||
|
|||
context 'when the frozen_string_literal comment is true' do | |||
context 'when the frozen_string_literal comment is true', unsupported_on: :prism do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make RSpec skip it on prism and let us know when it starts working because RSpec enforces pending specs must fail.
https://rspec.info/features/3-12/rspec-core/pending-and-skipped-examples/
context 'when the frozen_string_literal comment is true', unsupported_on: :prism do | |
context 'when the frozen_string_literal comment is true' do | |
pending 'Unsupported on prism' if ENV['PARSER_ENGINE'] == 'parser_prism' |
We could consider extracting a helper:
def prism?
ENV['PARSER_ENGINE'] == 'parser_prism'
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I didn't know about this feature. However, is this case it's not a prism-related issue, this spec only passes with Ruby 2.7 parser (dynamic strings are not frozen by default since 3.0), and while all the specs run with 2.7 parser, setting PARSER_ENGINE
to parser_prism
automatically promotes the parser to 3.3. So this spec will never pass on prism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added specs for default parser that run at Ruby 3.0 (it now covers this line).
See https://metaredux.com/posts/2024/03/09/rubocop-1-62-introduces-experimental-support-for-prism.html and https://bugs.ruby-lang.org/issues/20564