Standard practice now with Rails 4 seems to be to use Spring with spring-commands-rspec to generate bin/rspec. In rspec-core, because @load_time gets set in Reporter#start before Spring forks the rails process, the load time only gets set once, when the Spring server first starts. Every time I run my specs with bin/rspec, I get output like this:
Finished in 0.01662 seconds (files took 85 minutes 45 seconds to load)
12 examples, 0 failures, 3 pending
It was really just 85 minutes ago that Spring started.
When running rspec directly (not using the binstub provided by this gem), I do not have this issue.
I originally brought up the issue rspec/rspec-core#1574 with the rspec-core team, and we agreed that this would be better addressed by the launcher. @myronmarston pointed out that rspec exposes an attribute that alternate runners can set to the current time when they begin the setup for the next run.
I think this gem probably would be the most appropriate place to address this issue, but it also seems that the API provided by Spring::Commands is somewhat limited and may possibly not support what we need to do. You certainly would know better than me though. What are your thoughts?
Standard practice now with Rails 4 seems to be to use Spring with
spring-commands-rspecto generatebin/rspec. In rspec-core, because@load_timegets set inReporter#startbefore Spring forks the rails process, the load time only gets set once, when the Spring server first starts. Every time I run my specs withbin/rspec, I get output like this:It was really just 85 minutes ago that Spring started.
When running rspec directly (not using the binstub provided by this gem), I do not have this issue.
I originally brought up the issue rspec/rspec-core#1574 with the rspec-core team, and we agreed that this would be better addressed by the launcher. @myronmarston pointed out that rspec exposes an attribute that alternate runners can set to the current time when they begin the setup for the next run.
I think this gem probably would be the most appropriate place to address this issue, but it also seems that the API provided by
Spring::Commandsis somewhat limited and may possibly not support what we need to do. You certainly would know better than me though. What are your thoughts?