The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Faster TDD with Rails

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
Florian Weber

Posts: 94
Nickname: csshsh
Registered: Feb, 2005

Florian Weber is freelance developer from Hamburg, Germany
Faster TDD with Rails Posted: Oct 19, 2005 9:40 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Florian Weber.
Original Post: Faster TDD with Rails
Feed Title: Oakland Cutlery
Feed URL: http://blog.oaklandcutlery.com/wp-rss2.php
Feed Description: Ruby, Rails, Interface Design
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Florian Weber
Latest Posts From Oakland Cutlery

Advertisement

I admit it: I’m test infected. I love developing test-driven, especially with Rails.

However one of the things that was annoying me since quite a while now is that startup delay you have, when you run your Rails unit or functional tests from the console. That happens because Ruby has to parse all the thousands of lines of code that is Rails and setup the whole Rails environment.

Why would you wanna do that though everytime you run a test, when the only thing you’ve changed since the last run is your code, not the code of Rails?

Check out this movie

I have a Ruby script running in the background that starts up a Rails test environment and accepts test requests via DRb. Textmate basically just uses a little Ruby script that communicates with the server and tells it which test file (and optionally which test method) to run.

Since I’m using keyboard shortcuts to trigger the tests, you don’t quite see the difference of the delay between the two methods, but the last one is lot faster. On my Powerbook, using the first method took around three seconds for the tests to start, with the new method it almost feels like there is no delay at all.

Even when I’m using this with Textmate, it would basically work with any editor/IDE that can call a Ruby script.

Read: Faster TDD with Rails

Topic: RubyConf ADD Previous Topic   Next Topic Topic: RubyConf2005Keynote

Sponsored Links



Google
  Web Artima.com   

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