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

Doesn't work anymore #84

Closed jmuheim closed 8 years ago

jmuheim commented 8 years ago

During running, the indicator doesn't change, and the time is only question marks:

image

And when finished:

image

Using fuubar 2.0.0 and rails 4.2.1.

dreyks commented 8 years ago

Make sure you are not traveling in time in before(:all) blocks (use before(:each)) and always travel back in after blocks

jmuheim commented 8 years ago

Aaaah, this might be the problem. Thank you!

jfelchner commented 8 years ago

Actually time traveling should not affect the progress bar at all. If that fixes it I need to know.

dreyks commented 8 years ago

I'm pretty sure that I had this problem when I moved from TimeCop to rails' native travel_to. I'll try to come up with an isolated example tomorrow

jfelchner commented 8 years ago

@dreyks Ah, that's almost certainly the problem.

<rant> Instead of using the same two gems (Delorean and Timecop) that 90% of everyone else uses, DHH decided Rails needed to roll its own with almost the exact same code (very similar to what they did when they basically copied better_errors and put it in Rails instead of just leaving it as its own gem), which means it's another thing that we all now need to support. </rant>

If you can get me an isolated example and post an issue over on https://github.com/jfelchner/ruby-progressbar, I'd appreciate it.

dreyks commented 8 years ago

jfelchner/ruby-progressbar#106

jmuheim commented 8 years ago

Here's how I fixed it:

RSpec.configure do |config|
  config.include ActiveSupport::Testing::TimeHelpers

  config.before(:each) do
    travel_to DateTime.parse('2015-06-15 14:33:52 +0200')
  end

  config.after(:each) do
    travel_back
  end
end
jfelchner commented 8 years ago

I'll fix this properly in ruby-progressbar with @dreyks PR.

github-actions[bot] commented 3 years ago

This issue has been closed automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.