How do I speed up RSPEC?

I am setup on Mac (OS X) using RSPEC (version 1.0.8) for my tests.
This is the first
time I have used RSPEC before but it is running my tests extremely
slowly. I was trying to use ‘Autotest’ with Growl, but even just
the specs in my Terminal window is taking about a minute. Is a minute
normal for 40 tests? They are just the generic tests created from
rspec_scaffold.

Here is the code printed when I run my test:
/usr/local/bin/ruby -S script/spec -O spec/spec.opts spec/models/
weather_spec.rb spec/views/weathers/show.rhtml_spec.rb spec/
controllers/weathers_controller_spec.rb spec/views/weathers/
new.rhtml_spec.rb spec/views/weathers/edit.rhtml_spec.rb spec/helpers/
weathers_helper_spec.rb spec/views/weathers/index.rhtml_spec.rb

Finished in 49.875295 seconds

45 examples, 0 failures

What can I do to speed this up? Is this normal? I was thinking that
0.9 seconds was normal.

Any suggestions would be appreciated. Thanks.

Spec::Runner.configure do |config|
config.use_transactional_fixtures = true
end

in spec_helper.rb in spec/

Should be about 2 and a half times faster.

Are you aware how testing works?

Every time an individual test is run, whatever tables are specified in
the
fixtures are cleared and then filled up again with the fixtures.

Also, what kind of computer (specifications) are you running this under?

On Dec 6, 2007 6:50 AM, akv292 [email protected] wrote:

/usr/local/bin/ruby -S script/spec -O spec/spec.opts spec/models/

What can I do to speed this up? Is this normal? I was thinking that
0.9 seconds was normal.

Any suggestions would be appreciated. Thanks.


Ryan B.

I am working on Mac OS X Version 10.4.11; 2 Gigs RAM; 1.67 GHz PPC. I
actually don’t know that much about tests. I am trying to get
comfortable with Test-Driven Development, but I feel like the learning
curve is very large.

I have noticed an improvement in speed with some more resources freed
up on my computer. I am actually not using any fixtures at this point
yet. I just ran an RSPEC scaffold and generated the specs that way.

I have another question about TextMate’s tests with the RSPEC bundle,
but will probably open a new thread for it.

Thanks for your response Ryan.