Tagged: zentest

Setting up ZenTest and Red Green

I can't take credit for any of these instructions. Dave South from the Logan Ruby group sent these out in an email. I am posting them so that I can find them later on.

Install ZenTest:

sudo gem install ZenTest

Then install RedGreen

sudo gem install redgreen

Go to your rails project directory and create a file called: .autotest

mate .autotest

Add this to the file:


require 'redgreen/autotest'

Save and exit

In your terminal, change to your rails application. Instead of typing 'rake' to run the tests, type 'autotest'. It will load the tests and run them all the first time it loads. RedGreen will highlight the result in green if everything passes and red if anything fails. Autotest will continue to run, waiting for changes in the application.

Leave that terminal open and edit your rails application. Whenever you save the app, autotest will detect the save, identify the file(s) that changed, and run appropriate tests.

If you change a model file, for example, a...

Continue Reading →