Re: Why is rake really slow?
- From: Rich <richpoirier@xxxxxxxxx>
- Date: Fri, 17 Aug 2007 13:17:14 -0000
On Aug 17, 1:34 am, Rich <richpoir...@xxxxxxxxx> wrote:
On Aug 16, 5:05 pm, "Ed Howland" <ed.howl...@xxxxxxxxx> wrote:
On 8/15/07, hemant <gethem...@xxxxxxxxx> wrote:
On 8/16/07, Rich <richpoir...@xxxxxxxxx> wrote:
Its normally a good idea to take out actual db connections when
running tests. Did you look into mocha or something?
Also, switching to RSpec might help here. In addition to mocks to
isolate the DB from the tests, you can run rspec_server which loads
the Rails environment once and then when you run your tests, they
connect to the server, and respond much more quickly.
Ed
--
Ed Howlandhttp://greenprogrammer.blogspot.com
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from all computers."
Ok Ed, I've taken your advice and tried out rspec. I actually noticed
that the environment is loaded once before the tests are run and once
before each test task starts, so it's unnecessarily run three times if
you're testing units and functionals. So spec_server sounded like a
great solution and BDD is also very appealing.
However, I can't seem to get spec_server working properly. I can get
it running but executing a spec after that tells me the server is not
running, when I know it definitely is. I've tried with and withoutrake. I'm using Windows Vista, so maybe that's the problem? Do you
know anyone who's gotten it working in Vista? Thanks.
Ok I got it working. Turns out I didn't actually have any specs to
run. But it was still telling me no server was running which is
strange. I created a spec and ran it and man did it run fast compared
to Test::Unit.
So I think I'm all set now. rspec is awesome! Thanks for everyone's
help.
.
- References:
- Why is rake really slow?
- From: richpoirier
- Re: Why is rake really slow?
- From: Jim Weirich
- Re: Why is rake really slow?
- From: richpoirier
- Re: Why is rake really slow?
- From: Rich
- Re: Why is rake really slow?
- From: hemant
- Re: Why is rake really slow?
- From: Rich
- Why is rake really slow?
- Prev by Date: [QUIZ] Process Rings (#135)
- Next by Date: Re: Ruby-doc.org slow?
- Previous by thread: Re: Why is rake really slow?
- Next by thread: Re: Why is rake really slow?
- Index(es):
Relevant Pages
|
Loading