Skip to content

Usage with fuubar #23

@mollerhoj

Description

@mollerhoj

I use the fuubar formatter.

I just wanted to show a hack to get the formatter to work with this gem:

In Reporter#add, add the following hack:

       ...
        @formatters << formatter_class.new(output)

        if name == "Fuubar"
          output = `bundle exec rspec --dry-run | grep 'examples, 0 failures'`
          example_count = output.split(" ").first.to_i
          delegate_to_formatters(:start, RSpec::Core::Notifications::StartNotification.new(example_count))
        end

        @formatters
        ...

This will send the required StartNotification to fuubar.

Now we can run the specs with bundle exec turbo_tests -f Fuubar -r 'fuubar' to get nicely formatted output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions