Skip to content

Conversation

@pingfr
Copy link
Contributor

@pingfr pingfr commented Mar 30, 2020

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.

end

def error_count
reports_errors_outside? ? @summary_notification.errors_outside_of_examples_count : 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

Suggested change
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

Copy link
Contributor Author

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.

@sj26
Copy link
Owner

sj26 commented Mar 31, 2020

I think you'll need to add an errors_count method within lib/rspec_junit_formatter/rspec2.rb to fix the cross version tests.

They can be run with:

bundle install
bundle exec appraisal install
bundle exec appraisal rspec

You can test just rspec 2.x with:

bundle exec appraisal rspec-2-x rspec

@pingfr
Copy link
Contributor Author

pingfr commented Mar 31, 2020

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.

Copy link
Owner

@sj26 sj26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@sj26 sj26 merged commit 35bcf25 into sj26:master Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants