Class: ODDB::FiParse::TestFachinfoPDFWriterTrileptal

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
ext/fiparse/test/fachinfo_pdf_test.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



1277
1278
1279
1280
1281
1282
1283
# File 'ext/fiparse/test/fachinfo_pdf_test.rb', line 1277

def setup
  @writer = FachinfoPDFWriter.new
  path = File.expand_path('../test/data/method_calls_trileptal.rb',
    File.dirname(__FILE__))
  eval(File.read(path))
  @fachinfo = @writer.to_fachinfo
end

- (Object) test_galenic_form



1284
1285
1286
1287
1288
1289
1290
1291
# File 'ext/fiparse/test/fachinfo_pdf_test.rb', line 1284

def test_galenic_form
  assert_equal("Trileptal\256", @fachinfo.name)
  chapter = @fachinfo.galenic_form
  assert_equal('', chapter.heading)
  assert_equal(1, chapter.sections.size)
  section = chapter.sections.first
  assert_equal("Antiepileptikum\n", section.subheading)
end