forked from covermymeds/rubocop-thread_safety
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from viralpraxis/run-tests-with-prism-parser
Run tests with `prism` parser
- Loading branch information
Showing
6 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
unless RuboCop::Version.version >= '1.6' | ||
RSpec.shared_context 'ruby 2.7' do | ||
# Prism supports parsing Ruby 3.3+. | ||
let(:ruby_version) { ENV['PARSER_ENGINE'] == 'parser_prism' ? 3.3 : 2.7 } | ||
end | ||
|
||
RSpec.shared_context 'ruby 3.0' do | ||
# Prism supports parsing Ruby 3.3+. | ||
let(:ruby_version) { ENV['PARSER_ENGINE'] == 'parser_prism' ? 3.3 : 3.0 } | ||
end | ||
|
||
RSpec.shared_context 'ruby 3.1' do | ||
# Prism supports parsing Ruby 3.3+. | ||
let(:ruby_version) { ENV['PARSER_ENGINE'] == 'parser_prism' ? 3.3 : 3.1 } | ||
end | ||
|
||
RSpec.shared_context 'ruby 3.2' do | ||
# Prism supports parsing Ruby 3.3+. | ||
let(:ruby_version) { ENV['PARSER_ENGINE'] == 'parser_prism' ? 3.3 : 3.2 } | ||
end | ||
|
||
RSpec.shared_context 'ruby 3.3' do | ||
let(:ruby_version) { 3.3 } | ||
end | ||
|
||
RSpec.shared_context 'ruby 3.4' do | ||
let(:ruby_version) { 3.4 } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters