thekompanee / fuubar

The instafailing RSpec progress bar formatter
http://jeffkreeftmeijer.com/2010/fuubar-the-instafailing-rspec-progress-bar-formatter/
MIT License
955 stars 65 forks source link

`fuubar_auto_refresh` config undefined #121

Open vinnydiehl opened 1 year ago

vinnydiehl commented 1 year ago

I'm getting a failure when using the fuubar_auto_refresh option. In spec_helper.rb I have:

RSpec.configure do |config|
  # my configuration

  config.add_formatter "Fuubar"
  config.fuubar_auto_refresh = true
end

Output when I run the test suite is:

An error occurred while loading spec_helper.
Failure/Error: config.fuubar_auto_refresh = true

NoMethodError:
  undefined method `fuubar_auto_refresh=' for #<RSpec::Core::Configuration:...........>

I'm using Ruby 3.2.0, it's a Rails 7 app running on up-to-date Arch Linux. Without this configuration option Fuubar works perfectly.

anothermh commented 1 year ago

Add require 'fuubar' to the top of spec_helper.rb.

vinnydiehl commented 1 year ago

That stopped the error, but didn't cause the desired behavior of the progress bar refreshing every second. It continues to refresh with each test.

jfelchner commented 1 year ago

@vinnydiehl my guess is that this is a misconfiguration. No one else is reporting this.

jfelchner commented 1 year ago

I'm not following how the code is currently working so I'll look into this for you.