Class: ODDB::FiParse::TestPatinfoHpricotInderalDe

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



465
466
467
468
469
470
471
472
# File 'ext/fiparse/test/test_patinfo_hpricot.rb', line 465

def setup
  @path = File.expand_path('data/html/de/inderal.html', 
    File.dirname(__FILE__))
  @writer = PatinfoHpricot.new
  open(@path) { |fh| 
    @writer.extract(Hpricot(fh))
  }
end

- (Object) test_contra_indications3



476
477
478
479
480
481
482
483
484
485
# File 'ext/fiparse/test/test_patinfo_hpricot.rb', line 476

def test_contra_indications3
  chapter = @writer.contra_indications
  assert_instance_of(ODDB::Text::Chapter, chapter )
  assert_equal('Wann darf Inderal nicht angewendet werden?', 
               chapter.heading)
  assert_equal(1, chapter.sections.size)
  section = chapter.sections.first
  assert_equal("", section.subheading)
  assert_equal(3, section.paragraphs.size)
end

- (Object) test_galenic_form3



473
474
475
# File 'ext/fiparse/test/test_patinfo_hpricot.rb', line 473

def test_galenic_form3
  assert_nil(@writer.galenic_form)
end

- (Object) test_precautions3



486
487
488
489
490
491
492
493
494
495
# File 'ext/fiparse/test/test_patinfo_hpricot.rb', line 486

def test_precautions3
  chapter = @writer.precautions
  assert_instance_of(ODDB::Text::Chapter, chapter )
  assert_equal('Wann ist bei der Einnahme von Inderal Vorsicht geboten?', 
               chapter.heading)
  assert_equal(1, chapter.sections.size)
  section = chapter.sections.first
  assert_equal("", section.subheading)
  assert_equal(12, section.paragraphs.size)
end

- (Object) test_pregnancy3



496
497
498
499
500
501
502
503
504
505
# File 'ext/fiparse/test/test_patinfo_hpricot.rb', line 496

def test_pregnancy3
  chapter = @writer.pregnancy
  assert_instance_of(ODDB::Text::Chapter, chapter )
  assert_equal('Darf Inderal während einer Schwangerschaft oder in der Stillzeit eingenommen werden?', 
               chapter.heading)
  assert_equal(1, chapter.sections.size)
  section = chapter.sections.first
  assert_equal("", section.subheading)
  assert_equal(1, section.paragraphs.size)
end