Skip to content
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

Incorrect SimpleCov.formatter usage example in documentation #1097

Closed
bestwebua opened this issue Jun 19, 2024 · 1 comment
Closed

Incorrect SimpleCov.formatter usage example in documentation #1097

bestwebua opened this issue Jun 19, 2024 · 1 comment

Comments

@bestwebua
Copy link
Contributor

Following to the code under the hood:

def formatters=(formatters)
@formatter = SimpleCov::Formatter::MultiFormatter.new(formatters)
end

For SimpleCov.formatters call examples in the current documentation we need to use array of formatters:

SimpleCov.formatters = [
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::CSVFormatter,
]

instead of instance of SimpleCov::Formatter::MultiFormatter:

SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::CSVFormatter,
])

PR: #1096

@PragTob
Copy link
Collaborator

PragTob commented Jun 22, 2024

Fixed via #1096, thanks

@PragTob PragTob closed this as completed Jun 22, 2024
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

No branches or pull requests

2 participants