Re: Why is rake really slow?



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.

.



Relevant Pages

  • Re: Why is rake really slow?
    ... the Rails environment once and then when you run your tests, ... connect to the server, ... I've taken your advice and tried out rspec. ... I'm using Windows Vista, ...
    (comp.lang.ruby)
  • Re: 4-way Opteron vs. Xeon-IBM X3 architecture
    ... > seen such discussion of memory configs in almost all. ... > With the right devices and with registering the server market should be ... Which is what is shipping in HP's Opteron server, ... following the new spec. ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: Redundant Server at Lower Spec
    ... live to the redundant server if there is a hardware problem. ... What I am thinking is that I will buy a lower spec DL380 for the ... Instead of a 3.0 GHz, I will buy a 2.0 GHz server. ... will the OS accept this should I switch the hard drives? ...
    (microsoft.public.windows.server.general)
  • Re: WoW Soloist Page
    ... I'm not sure how it is with fire spec but frost has so many good choices going up the tree right from the start that it's kind of hard to decide what you want. ... I play on a PvP server so I need to be able to defend myself. ...
    (alt.games.warcraft)
  • Re: Redundant Server at Lower Spec
    ... Processor speed won't matter at all however different makes of processor would probably matter ... The main issues you may find when moving drives from one server to another are different driver requirements, especially disk controller, NIC & system board chipset. ... As I know it works no problem at all with the same spec I wanted to know whether it would with a slighly different spec. ...
    (microsoft.public.windows.server.general)

Loading