On 4/20/06, Agnieszka F. email@example.com wrote:
this is a typical “how do you do it in Rails” question I would like
to incorporate fit testing into a RoR app and I’d like to hear your
recommendations on how to do it. In the ideal world I would like all the
table test definitions and implementations stored in svn together with
the app, ability to run the tests with a rake task + a hook to FitNesse,
so that non-developers can easily see and run the tests (not necessarily
modify them). Feasible? If anyone has experiences please share! Also,
which Ruby implementation of FIT are you using?
Well, we looked into this as well, and decided (for now) to go with
integration testing. We have implemented a small DSL that lets the
tests be stated in a straightforward way (English-like,) just how
Jamis has it in his blog.
Our customer didn’t want to fire up a ruby IDE to enter tests however.
So I am not sure how to meet that requirement yet. First thoughts:
Use REXML to parse XHTML table.
extract the DSL code
wrap in ruby syntax (pull in Test::Unit::TestCase, our DSL module etc.)
dynamically eval resulting Ruby string.
use Test::Init::Util::Observable to listen to test results,
output that in HTML/XML+CSS