An elegant way of reusing Rails Test::Unit additions for Fit / Fitnesse fixtures


Rails testing support is awesome. I've been trying to use Fit -
Fitnesse for acceptance testing.

Soon I was missing my get and post helper methods - Since they are
part of Test::Unit and fit fixtures have to derive from fixture
specific base classes. I turned to composition.. created a dummy test
case derivation as a member of the fixture. Distilled out the
essential things.. and it works.
However i was curious as to the manner in which others accomplish the
same thing. If you can think of better ways to do this.. please post

require File.dirname(__FILE__) + '/../test/test_helper'
require 'inflow_controller'
require 'fit/fixture'

class RailsHelper < Test::Unit::TestCase
  def setup
    @controller =
    @request =
    @response =
  def test_dummy
module AcceptanceTests
  class EnterInflowRecords < Fit::Fixture

    attr_accessor :description, :amount
    def initialize
      @helper ="test_dummy")
    def addEntry
      @helper.get :new :create, :credit => {:description =>
@description, :amount => @amount}
    def current_balance
      return 0