-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added support to read outside error count returned from XML formatter. #86
Conversation
lib/rspec_junit_formatter/rspec3.rb
Outdated
@@ -45,6 +45,10 @@ def examples | |||
@examples_notification.notifications | |||
end | |||
|
|||
def error_count | |||
reports_errors_outside? ? @summary_notification.errors_outside_of_examples_count : 0 |
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.
How about:
reports_errors_outside? ? @summary_notification.errors_outside_of_examples_count : 0 | |
# Introduced in rspec 3.6 | |
if @summary_notification.respond_to?(:errors_outside_of_examples_count) | |
@summary_notification.errors_outside_of_examples_count | |
else | |
0 | |
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.
That works for me. I will make that change and push it.
I think you'll need to add an They can be run with:
You can test just rspec 2.x with:
|
Travis is happy now. Let me know if there are any other concerns before you accept the PR. Also wondering when it will be part of an official release. |
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.
Great, thank you!
I opened a issue #85 to get error count from errors outside of an example. This is the pull request for that issue. Please let me know if there is any further action needed.