------art_10108_2445808.1170464326230
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 2/2/07, Jeff <cohen.jeff / gmail.com> wrote:
>
> I'm looking into a way to let business users write functional tests in
> rails, and I wanted to have my functional test file load an external
> file to supply the body of a method.  It occurs to me that Rake must
> have solved a similar problem, but I can't quite figure out how Jim
> did it.
>
> What I want to write is something like this:
>
> class MyTests < Test::Unit::TestCase
>
> # typical setup and teardown here
>
> # a test method to "wrap" an external ruby file
>
> def test_acceptance
>    load 'acceptance.rb'  # load file written by business user
> end
>
> def foo
> end
>
> def bar
> end
>
> end


Systir was made to solve this exact problem.  Have a look, it's not a lot of
code and should be easy to adapt to your situation.

http://atomicobject.com/pages/System+Testing+in+Ruby

Cheers,
/Nick

------art_10108_2445808.1170464326230--