Closed jmuheim closed 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
Aaaah, this might be the problem. Thank you!
Actually time traveling should not affect the progress bar at all. If that fixes it I need to know.
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
@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.
jfelchner/ruby-progressbar#106
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
I'll fix this properly in ruby-progressbar with @dreyks PR.
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.
During running, the indicator doesn't change, and the time is only question marks:
And when finished:
Using fuubar 2.0.0 and rails 4.2.1.