[rspec-users] Slow Focus tags

Rainer Kuhn rainer at incutio.com
Wed Jun 6 10:14:34 UTC 2012

[This is my third and final attempt to post to this group, first 2 were
with google groups]

I noticed that focusing a single spec takes ages to run. We commonly use
that, often in combination with guard to speed up our spec runs. I admit
that the overall performance of our specs is bad, since we ditched mocking
entirely and went with semi-integration specs on all levels. But this
practice has served us very well on picking up failures.

All runs on a single spec with focus: true that only tests (2 + 2).should
== 4, among 700 other specs.
Any ideas how to profile or even fix that?

# What I want to get:
$ time rspec spec/models/user_spec.rb:5
Finished in 1.41 seconds 1 example, 0 failures
real 0m13.768s
user 0m11.269s
sys 0m1.692s

# What I get using the focus tag:
$ time rake spec
Finished in 2.1 seconds 1 example, 0 failures
real 1m5.502s
user 0m46.467s
sys 0m14.455s

$time rspec spec
Finished in 1.39 seconds 1 example, 0 failures
real 0m51.350s
user 0m36.069s
sys 0m12.842s

Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120606/cd57d0bc/attachment.html>

More information about the rspec-users mailing list