The Artima Developer Community
Sponsored Link

Python Buzz Forum
rspec and spec_server

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Phillip Pearson

Posts: 1083
Nickname: myelin
Registered: Aug, 2003

Phillip Pearson is a Python hacker from New Zealand
rspec and spec_server Posted: Jul 31, 2008 2:15 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Phillip Pearson.
Original Post: rspec and spec_server
Feed Title: Second p0st
Feed URL: http://www.myelin.co.nz/post/rss.xml
Feed Description: Tech notes and web hackery from the guy that brought you bzero, Python Community Server, the Blogging Ecosystem and the Internet Topic Exchange
Latest Python Buzz Posts
Latest Python Buzz Posts by Phillip Pearson
Latest Posts From Second p0st

Advertisement

Not immediately obvious when you start using RSpec is that there's a way to get around the huge Rails startup delay. If you've got a spare 80M of memory, you can tell RSpec to load up Rails in the background and hang around until you want to run tests.

rake spec:server:start

Then run your specs like this:

script/spec -X -o spec/spec.opts spec/whatever

The -X tells script/spec to connect to the spec server via DRb and tell it to run the tests, rather than to load up Rails and run the tests itself.

A few runs here show it running about 6 seconds faster with the server, which isn't a big deal over a full test suite but makes a nice difference when focussing on a single spec (1.9 s is much nicer than 8 s).

Comment

Read: rspec and spec_server

Topic: Making a proxy with WSGI and lxml Previous Topic   Next Topic Topic: New Gig: Songbird

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use