[rspec-users] Help: Attempts to run specs quitting midstream
lists at ruby-forum.com
Tue Nov 18 12:06:40 EST 2008
Evan Dorn wrote:
> I am having a very frustrating problem running specs on my current
> project. When I run tests en masse with "rake spec" or with autotest,
> it frequently quits without completing all the tests. It also
> sometimes runs the tests in multiple batches, giving more than one
> result line for a single batch of tests.
I was having a similar problem. My specs would quit running after a
third of them ran. When I ran my specs using ./script/spec spec I'd get
a different count and my specs would run as two batches.
I decided to run each of my specs separately using something like:
ruby script/spec "spec/controllers/name_of_a_specific_spec.rb"
That showed that some of my specs were in fact failing. If I tried to
run ./script/specs with any options I'd get a report of:
0 examples, 0 failures
Then I decided to run each directory under spec/* separately so I could
try to narrow down which specs were causing the problem. I ran:
When I ran views I got the same "0 examples, 0 failures" message so I
ran each folder separately:
That let me narrow it down to specific views that were causing the
problem. Then I ran each spec separately.
My problem was caused by using
that out fixed RSpec for me. I can now run it using rake spec or even
rake spec:rcov and it works the same as running ./script/spec spec.
Hope that helps. I'm still not sure why RSpec is failing this way.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users