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

Handle fuubar #51

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

inkstak
Copy link

@inkstak inkstak commented Apr 8, 2024

Fix #23 : Allow to use the Fuubar formatter.

This pull request depends on #41.
The changes from #41 could be seen inkstak/turbo_tests@feature-parallel_options...feature-handle_fuubar

@inkstak
Copy link
Author

inkstak commented Apr 8, 2024

I had issues when using JSON formatter for extracting the number of total examples as suggested in #23 (comment)
The backticks capture the full output of the command, which may include other puts.

For example:

  • We have Dotenv configured to output which files are loaded on top of every rspec command:
    [dotenv] Load .env.test

  • Simplecov might output a line after the JSON output :
    Coverage report generated for ... (x%) covered.

Any ideas ?

@inkstak inkstak force-pushed the feature-handle_fuubar branch 2 times, most recently from 56d29b3 to 6bfb97b Compare April 11, 2024 13:13
@inkstak
Copy link
Author

inkstak commented Apr 11, 2024

PR updated :

  • I finally succeed to properly calculate the examples count using the JSON formatter as suggested in Usage with fuubar #23 (comment) by using a temporary file.
  • I removed all references specifici to Fuubar: the changes could now benefit to any custom formatter that requires the examples_count.

Changes are splitted in two commits :

  1. e1f8f6b is only a refactoring of the Runner class to allow forwarding files & parallel options (which depends on Support parallel_test options: pattern, exclude-pattern & group-by #41) to the Reporter

  2. 6bfb97b add a start notification with the examples_count

@inkstak
Copy link
Author

inkstak commented Apr 11, 2024

One more thing : to use Fuubar, you need to require it in the command :

bundle exec turbo_tests -r fuubar -f Fuubar spec/whatever

README.md Outdated Show resolved Hide resolved
lib/turbo_tests/cli.rb Show resolved Hide resolved
lib/turbo_tests/reporter.rb Show resolved Hide resolved
@inkstak inkstak force-pushed the feature-handle_fuubar branch from 6bfb97b to a5c8c77 Compare April 17, 2024 07:10
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.

Usage with fuubar
2 participants