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

Leave a comment

About this Entry

This page contains a single entry by zenspider published on August 3, 2006 2:48 PM.

you might just fit here... was the previous entry in this blog.

Upgrade rails now is the next entry in this blog.

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

Pages

Powered by Movable Type 4.32-en