All Projects → thekompanee → Fuubar

thekompanee / Fuubar

Licence: mit
The instafailing RSpec progress bar formatter

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Fuubar

rubybookshelf
The Thoughtbot contest Winner application
Stars: ✭ 14 (-98.36%)
Mutual labels:  rspec
Autodoc
Generate documentation from your rack application & request-spec.
Stars: ✭ 366 (-57.24%)
Mutual labels:  rspec
Chefspec
Write RSpec examples and generate coverage reports for Chef recipes!
Stars: ✭ 825 (-3.62%)
Mutual labels:  rspec
Crystalball
Regression Test Selection library for your RSpec test suite
Stars: ✭ 259 (-69.74%)
Mutual labels:  rspec
Rspec Style Guide
可読性の高いテストコードを書くためのお作法集
Stars: ✭ 325 (-62.03%)
Mutual labels:  rspec
Rspec Benchmark
Performance testing matchers for RSpec
Stars: ✭ 460 (-46.26%)
Mutual labels:  rspec
factory bot-preload
Preload factories (factory_bot) just like fixtures. It will be easy and, probably, faster!
Stars: ✭ 68 (-92.06%)
Mutual labels:  rspec
Rspec Validator spec helper
Provide dummy class for validator spec
Stars: ✭ 19 (-97.78%)
Mutual labels:  rspec
N plus one control
RSpec and Minitest matchers to prevent N+1 queries problem
Stars: ✭ 345 (-59.7%)
Mutual labels:  rspec
Rspec Style Guide
Best practices for writing your specs!
Stars: ✭ 735 (-14.14%)
Mutual labels:  rspec
Everydayrails Rspec 2017
Sample source for the 2017 edition of Everyday Rails Testing with RSpec.
Stars: ✭ 280 (-67.29%)
Mutual labels:  rspec
Infrataster
Infrastructure Behavior Testing Framework
Stars: ✭ 322 (-62.38%)
Mutual labels:  rspec
Sinatra Template
A base Sinatra application template with DataMapper, and RSpec. Just fork and build.
Stars: ✭ 534 (-37.62%)
Mutual labels:  rspec
Rspec junit formatter
RSpec results that your CI can read
Stars: ✭ 255 (-70.21%)
Mutual labels:  rspec
Capybara error intel
🐛 Ruby gem for heuristic error messages in Capybara based Page Objects
Stars: ✭ 16 (-98.13%)
Mutual labels:  rspec
jsonapi-swagger
Create a JSONAPI Swagger.
Stars: ✭ 49 (-94.28%)
Mutual labels:  rspec
Knapsack
Knapsack splits tests evenly across parallel CI nodes to run fast CI build and save you time.
Stars: ✭ 430 (-49.77%)
Mutual labels:  rspec
Rails Api And Angularjs
Integration between rails and angularjs which includes rspec tests.
Stars: ✭ 22 (-97.43%)
Mutual labels:  rspec
Aruba
Test command-line applications with Cucumber-Ruby, RSpec or Minitest. The most up to date documentation can be found on Cucumber.Pro (https://app.cucumber.pro/projects/aruba)
Stars: ✭ 900 (+5.14%)
Mutual labels:  rspec
Rubocop Rspec
Code style checking for RSpec files
Stars: ✭ 603 (-29.56%)
Mutual labels:  rspec

Fuubar


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

Enabling Auto-Refresh

By default fuubar refreshes the bar only between each spec. You can enable an auto-refresh feature that will keep refreshing the bar (and therefore the ETA) every second. You can enable the feature as follows:

# spec/spec_helper.rb

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

Undesirable Effects

Unfortunately this option doesn't play well with things like debuggers, as having a bar show up every second would be undesireable (which is why the feature is disabled by default). Depending on what you are using, you may be given ways to work around this problem.

Pry

Pry provides hooks that can be used to disable fuubar during a debugging session, you could for example add the following to your spec helper:

# spec/spec_helper.rb

Pry.config.hooks.add_hook(:before_session, :disable_fuubar_auto_refresh) do |_output, _binding, _pry|
  RSpec.configuration.fuubar_auto_refresh = false
end

Pry.config.hooks.add_hook(:after_session, :restore_fuubar_auto_refresh) do |_output, _binding, _pry|
  RSpec.configuration.fuubar_auto_refresh = true
end
Byebug

Unfortunately byebug does not provide hooks, so your best bet is to disable auto-refresh manually before calling byebug.

RSpec.configuration.fuubar_auto_refresh = false
byebug

Security

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

  • 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)
    
  • 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-2021 Jeff Kreeftmeijer and Jeff Felchner. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].