Posted By

joshcarter on 08/31/10


Tagged

UnitTest


Versions (?)

Read Canned Data File For Unit Test


 / Published in: Ruby
 

  1. class Test::Unit::TestCase
  2. def canned_file(filename, format = :xml)
  3. File::read("test/data/#{filename}.#{format}")
  4. end
  5. end

Report this snippet  

You need to login to post a comment.