guard/guard-rspec — Issue #61: Rspec 2.7 total time is wrong
Author: Nerian
Created: 2011-10-17 10:54:44+00:00
State: open

Hi,

With the new release of RSpec 2.7 the total time calculation has been modified:

`Provide more accurate run time by registering start time before code is loaded (David Chelimsky)`
https://www.relishapp.com/rspec/rspec-core/docs/changelog

Check the Finished in *** seconds in the following code. It is calculated from the time guard was started. It doesn't reflect how much the actual test took to run.

```
$ guard
Guard is now watching at '/Users/Nerian/Projects/davinci'
Starting Spork for RSpec
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Spork server for RSpec successfully started
Guard::RSpec is running, with RSpec 2!
Running all specs
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/gems/guard-rspec-0.5.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]...
.................

Finished in 7.39 seconds
17 examples, 0 failures
Done.

Running all specs
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/gems/guard-rspec-0.5.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]...
.................

Finished in 13.07 seconds
17 examples, 0 failures
Done.

Running all specs
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/gems/guard-rspec-0.5.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]...
.................

Finished in 18.53 seconds
17 examples, 0 failures
Done.

Running all specs
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/gems/guard-rspec-0.5.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]...
.................

Finished in 23.64 seconds
17 examples, 0 failures
Done.

```