Preferring mocks over factories can help. Spork can help too by preloading the Rails environment.<div>That's tended to be enough for me, although you can do distributed tests too.</div><div><br></div><div><a href="https://www.ruby-toolbox.com/categories/distributed_testing">https://www.ruby-toolbox.com/categories/distributed_testing</a></div>
<div><br></div><div>Also I presume you're not hitting the web, but if you are then VCR with WebMock is good</div><div><br><br><div class="gmail_quote">On 24 January 2012 19:02, Jonathan <span dir="ltr"><<a href="mailto:j.fantham@gmail.com">j.fantham@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mine are really slow, but yesterday Glenn made a suggestion of using a<br>
ramdisk to speed the database access which seemed like a good idea! I<br>
haven't had the opportunity to try it yet but I read into it and if<br>
you're on *nix it seems pretty easy to do.<br>
<br>
On 24 January 2012 09:57, Joel Chippindale<br>
<div><div class="h5"><<a href="mailto:joel.chippindale@econsultancy.com">joel.chippindale@econsultancy.com</a>> wrote:<br>
> Test speed seems to be a perennial issue for our team.<br>
><br>
> Currently running a single spec file in our rails (v3.0, running under REE)<br>
> app takes about 20 seconds and running a single cucumber scenario 30+<br>
> seconds. This is too slow for comfortable test driven development/design.<br>
><br>
> We've recently started using the spec_no_rails pattern (as outlined by Corey<br>
> Haines<br>
> here <a href="http://www.confreaks.com/videos/641-gogaruco2011-fast-rails-tests" target="_blank">http://www.confreaks.com/videos/641-gogaruco2011-fast-rails-tests</a>) to<br>
> avoid loading rails, in some of our specs. This has enabled us to run some<br>
> of our specs in couple of seconds (i.e. fast enough). However this currently<br>
> only applies to the small subset of our specs that we have isolated from<br>
> rails. We'd like it if all our tests ran this fast.<br>
><br>
> How fast are your tests/specs/cucumber? Are they fast enough for you? If<br>
> they are, what have you done to make this so?<br>
><br>
> J.<br>
><br>
> --<br>
> Joel Chippindale<br>
> CTO - <a href="http://econsultancy.com" target="_blank">http://econsultancy.com</a><br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Chat mailing list<br>
> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
> <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
><br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</blockquote></div><br></div>