Skip to content
The instafailing RSpec progress bar formatter
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Chore: Update to the most recent config files Jul 12, 2018
bin Chore: Add setup script Dec 31, 2017
certs Chore: Update Rubygems Certificate Aug 3, 2018
checksum Chore: Add checksums for fuubar-2.4.0.gem Jun 3, 2019
lib Style: Make whitespace changes May 29, 2019
settings Chore: Update config files to latest versions Apr 26, 2016
spec Chore: Upgrade Rubocop Config May 28, 2019
.chamber.pub.pem Chore: Update config files to latest versions Apr 26, 2016
.gitignore Chore: Update to the most recent config files Jun 4, 2019
.overcommit.yml Chore: Update to the most recent config files Jun 4, 2019
.rspec Add .rspec to eat my own dogfood Nov 17, 2010
.rubocop.yml Chore: Update to the most recent config files Jun 4, 2019
.rubocop_core.yml Chore: Update to the most recent config files Jun 4, 2019
.rubocop_local.yml Chore: Upgrade Rubocop Config May 28, 2019
.rubocop_performance.yml Chore: Update to the most recent config files Jun 4, 2019
.rubocop_rspec.yml Chore: Update to the most recent config files Jun 4, 2019
.ruby-version Chore: Upgrade Ruby and Gems May 28, 2019
.travis.yml Chore: Update travis Configuration May 29, 2019
.yamllint Chore: Upgrade Rubocop Config May 28, 2019
CHANGELOG.md Docs: Update CHANGELOG for version 2.4.0 Jun 3, 2019
CODE-OF-CONDUCT.md Chore: Update config files to latest versions Apr 26, 2016
Gemfile Chore: Update gems Aug 3, 2018
Gemfile.lock Version Bump to 2.4.0 Jun 3, 2019
LICENSE.txt Chore: Update to the most recent config files Jun 4, 2019
README.md Add: Option To Hide Pending Spec Summary May 29, 2019
fuubar.gemspec Chore: Update to the most recent config files Jun 4, 2019

README.md

Fuubar

Gem Version Rubygems Rank Overall Rubygems Rank Daily Rubygems Downloads Build Status Code Climate

fuubar is an instafailing RSpec formatter that uses a progress bar instead of a string of letters and dots as feedback.

examples

Installation

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

rspec --format Fuubar --color

Option 2: Add It To Your Local .rspec File

# .rspec

--format Fuubar
--color

Option 3: Add It To Your spec_helper.rb

# spec/spec_helper.rb

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

Advanced Usage

Customizing The Bar

fuubar exposes an RSpec configuration variable called fuubar_progress_bar_options which, when set will be passed directly to ruby-progressbar which does all the heavy lifting. Take a look at the ruby-progressbar documentation for details on all of the options you can pass in.

Example

Let's say for example that you would like to change the format of the bar. You would do that like so:

# spec/spec_helper.rb

RSpec.configure do |config|
  config.fuubar_progress_bar_options = { :format => 'My Fuubar! <%B> %p%% %a' }
end

would make it so that, when fuubar is output, it would look something like:

My Fuubar! <================================                  > 53.44% 00:12:31

Hiding Pending/Skipped Spec Summary

By default fuubar follows RSpec's lead and will dump out a summary of all of the pending specs in the suite once the test run is over. This is a good idea because the additional noise is a nudge to fix those tests. We realize however that not all teams have the luxury of implementing all of the pending specs and therefore fuubar gives you the option of supressing that summary.

Example

# spec/spec_helper.rb

RSpec.configure do |config|
  config.fuubar_output_pending_results = false
end

Disabling Auto-Refresh

By default fuubar will automatically refresh the bar (and therefore the ETA) every second. Unfortunately this doesn't play well with things like debuggers. When you're debugging, having a bar show up every second is undesireable. Pry gives us hooks so that we can automatically disable the refresh when it's used. Unfortunately byebug does not and disabling the bar must be done manually.

Example

# spec/spec_helper.rb

RSpec.configure do |config|
  config.fuubar_auto_refresh = false
end

Security

fuubar is cryptographically signed. To be sure the gem you install hasn’t been tampered with, follow these steps:

  1. Add my public key (if you haven’t already) as a trusted certificate
gem cert --add <(curl -Ls https://raw.github.com/thekompanee/fuubar/master/certs/thekompanee.pem)
  1. Install fuubar telling it to use security checks when possible.
gem install fuubar -P MediumSecurity

Note: The MediumSecurity trust profile will verify signed gems, but allow the installation of unsigned dependencies.

This is necessary because fuubar has a dependency on RSpec which isn't signed, and therefore we cannot use HighSecurity, which requires signed gems.

Credits

fuubar was written by Jeff Felchner and Jeff Kreeftmeijer

The Kompanee

fuubar is maintained and funded by The Kompanee, Ltd.

The names and logos for The Kompanee are trademarks of The Kompanee, Ltd.

License

fuubar is Copyright © 2010-2019 Jeff Kreeftmeijer and Jeff Felchner. It is free software, and may be redistributed under the terms specified in the LICENSE file.

You can’t perform that action at this time.