ZenTest: August 2006 Archives

using ZenTest on rails

| | Comments (0)

Currently to run zentest on rails you have to jump through some extra hoops. This is because you need to require config/environment to get the magic const loader. BUT, because that maps ClassName to class_name.rb, you also have to load app/controllersapplication.rb (because the class inside is ApplicationController, not Application):

ruby -I.:lib:test -r ./config/environment.rb -r app/controllers/application.rb \
  -S zentest -r app/controllers/groups_controller.rb \
  test/functional/groups_controller_test.rb

I've got some unreleased changes that should make it as easy as:

zentest -r app/controllers/groups_controller.rb \
  test/functional/groups_controller_test.rb

About this Archive

This page is a archive of entries in the ZenTest category from August 2006.

ZenTest: July 2006 is the previous archive.

ZenTest: September 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1