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

Add: fuubar To Relish Documentation Under Formatters #2838

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions features/formatters/fuubar.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Feature: fuubar

[fuubar](https://github.com/thekompanee/fuubar) is an instafailing formatter
that uses a progress bar instead of a string of letters and dots as feedback.

It provides visual feedback of how many specs are left to be run as well as
a rough approximation of how long it will take.

![demo](https://kompanee-public-assets.s3.amazonaws.com/readmes/fuubar-examples.gif)

Installation
--------------------------------------------------------------------------------

```ruby
gem install fuubar

# or in your Gemfile

gem 'fuubar'
```

Usage
--------------------------------------------------------------------------------

In order to use fuubar, you have three options.

### Option 1: Invoke It Manually Via The Command Line

```bash
rspec --format Fuubar --color
```

### Option 2: Add It To Your Local `.rspec` File

```text
# .rspec

--format Fuubar
--color
```

### Option 3: Add It To Your `spec_helper.rb`

```ruby
# spec/spec_helper.rb

RSpec.configure do |config|
config.add_formatter 'Fuubar'
end
```

---

For more information, you can [view the fuubar
README](https://github.com/thekompanee/fuubar)
Comment on lines +1 to +55
Copy link
Member

Choose a reason for hiding this comment

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

I would write this as a scenario (or scenarios) demonstrating 3rd party formatters.

Suggested change
Feature: fuubar
[fuubar](https://github.com/thekompanee/fuubar) is an instafailing formatter
that uses a progress bar instead of a string of letters and dots as feedback.
It provides visual feedback of how many specs are left to be run as well as
a rough approximation of how long it will take.
![demo](https://kompanee-public-assets.s3.amazonaws.com/readmes/fuubar-examples.gif)
Installation
--------------------------------------------------------------------------------
```ruby
gem install fuubar
# or in your Gemfile
gem 'fuubar'
```
Usage
--------------------------------------------------------------------------------
In order to use fuubar, you have three options.
### Option 1: Invoke It Manually Via The Command Line
```bash
rspec --format Fuubar --color
```
### Option 2: Add It To Your Local `.rspec` File
```text
# .rspec
--format Fuubar
--color
```
### Option 3: Add It To Your `spec_helper.rb`
```ruby
# spec/spec_helper.rb
RSpec.configure do |config|
config.add_formatter 'Fuubar'
end
```
---
For more information, you can [view the fuubar
README](https://github.com/thekompanee/fuubar)
Feature: Configuring 3rd party formatters
RSpec supports a variety of 3rd party formatters thanks to our awesome community.
One such example is [`fuubar`](https://github.com/thekompanee/fuubar) a fast failing formatter which approximates your test suite as a progress bar rather than continuous output, providing visual feedback of how many specs are left to run.
Scenario: Invoking a 3rd party formatter manually from the command line.
Given the "fuubar" gem is installed
Given a file named "spec/example_spec.rb" with:
"""ruby
RSpec.describe "examples" do
it "is an example" do
end
it "is another example" do
end
end
"""
When I run `rspec --format Fuubar spec/example_spec.rb`
Then the output should contain "<fuubar output>"
Scenario: Invoking a 3rd party formatter via a .rspec file
Given the "fuubar" gem is installed
Given a file named ".rspec" with:
"""
--format Fuubar
"""
And a file named "spec/example_spec.rb" with:
"""ruby
RSpec.describe "examples" do
it "is an example" do
end
it "is another example" do
end
end
"""
When I run `rspec spec/example_spec.rb`
Then the output should contain "<fuubar output>"
Scenario: Invoking a 3rd party formatter via your spec_helper.rb
Given the "fuubar" gem is installed
Given a file named "spec/spec_helper.rb" with:
"""ruby
RSpec.configure do |config|
config.add_formatter 'Fuubar'
end
"""
And a file named "spec/example_spec.rb" with:
"""ruby
RSpec.describe "examples" do
it "is an example" do
end
it "is another example" do
end
end
"""
When I run `rspec spec/example_spec.rb`
Then the output should contain "<fuubar output>"