-
Notifications
You must be signed in to change notification settings - Fork 26
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
Remove default seed
value
#48
Conversation
03a879f
to
84f2487
Compare
lib/turbo_tests/reporter.rb
Outdated
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 don't like that TurboTests::Reporter
almost entirely duplicates RSpec::Core::Reporter
. I'll try to inherit RSpec::Core::Reporter
or do something similar to avoid duplication.
@@ -254,12 +259,17 @@ def handle_messages | |||
break | |||
end | |||
when "message" | |||
@reporter.message(message[:message]) | |||
if message[:message].include?("An error occurred") || message[:message].include?("occurred outside of examples") |
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.
We have to check message contents because RSpec outputs errors outside of examples as regular messages which we format in TurboTests::JsonRowsFormatter#message
.
Ref RSpec::Core::Reporter#notify_non_example_exception
: https://github.com/rspec/rspec-core/blob/5699fcdc4723087ff6139af55bd155ad9ad61a7b/lib/rspec/core/reporter.rb#L163-L170
Ref TurboTests::JsonRowsFormatter#message
:
turbo_tests/lib/turbo_tests/json_rows_formatter.rb
Lines 97 to 102 in bb814e1
def message(notification) | |
output_row( | |
type: :message, | |
message: notification.message | |
) | |
end |
Errors outside of examples begin with An error occurred
or While loading
:
- https://github.com/rspec/rspec-core/blob/5699fcdc4723087ff6139af55bd155ad9ad61a7b/lib/rspec/core/hooks.rb#L383
- https://github.com/rspec/rspec-core/blob/5699fcdc4723087ff6139af55bd155ad9ad61a7b/lib/rspec/core/example.rb#L660
- https://github.com/rspec/rspec-core/blob/5699fcdc4723087ff6139af55bd155ad9ad61a7b/lib/rspec/core/configuration.rb#L2142
- https://github.com/rspec/rspec-core/blob/5699fcdc4723087ff6139af55bd155ad9ad61a7b/lib/rspec/core/configuration.rb#L2159
And end with occurred outside of examples
:
Ruby 3.3 didn't output `NilClass` in `undefined method `[]' for nil` message Ref: https://github.com/serpapi/turbo_tests/actions/runs/9370241051/job/25796715330
Fixes #56
Resolves #40
Resolves #57
Changes
seed
value (ref: Add seed parameter to turbo tests #33)