timcharper/spork — Issue #151: Timer not resetting between runs
Author: murdoch
Created: 2011-10-18 00:04:48+00:00
State: open

From reading other recent issues, I know you're busy Tim but I've run into a small issue with spork and thought I'd better log it.

Using spork 0.9.0.rc9, I've noticed that the timer which displays how long specs are taking to run is not resetting itself between runs and is instead outputting the total time that has accumulated since the spork server was started.

Steps to reproduce:

1. start spork from console with command `spork`
2. in another window run `rspec . --drb`
3. observe that specs take X seconds to run and that console output verifies this
4. wait 60 seconds, modify a controller spec, and repeat step 2
5. observe that specs take about Y seconds to run, but console output claims that they took (X + Y + 60) seconds.
6. wait 10 minutes, repeat step 2
7. observe that specs run in Z seconds but console output puts the figure at (X + Y + Z + 600) seconds

My spec_helper is just the standard one that rspec-rails generates for you and I've put everything inside the spork prefork block as follows:

```
require 'rubygems'
require 'spork'

Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'

Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
end
end
```

Like I said, i know you're busy and this isn't exactly a show-stopper but I thought I'd better log it. Perhaps it's just something I'm doing wrong.