views:

21

answers:

0

Since it now seems to have replaced TestUnit in 1.9.1, I can't seem to find an equivalent to this. There are times when you really just want a method to run once for the suite of tests. For now I've resorted to some lovely hackery along the lines of:

Class ParseStandardWindTest < MiniTest::Unit::TestCase
  @@reader ||= PolicyDataReader.new(Time.now)  
  @@data ||= @@reader.parse  
  def test_stuff  
    transaction = @@data[:transaction]  
    assert true, transaction  
  end  
end