Class: ODDB::CoMarketing::TestPdfParser

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

Instance Method Summary collapse

Instance Method Details

#setupObject



13
14
15
16
17
# File 'ext/comarketing/test/test_pdf_parser.rb', line 13

def setup
	path = File.expand_path('data/Co-Marketing-Praeparate_nach_Basis.pdf', 
													File.dirname(__FILE__))
	@parser = PdfParser.new(path)
end

#test_extract_pairsObject



18
19
20
21
22
23
24
25
26
27
# File 'ext/comarketing/test/test_pdf_parser.rb', line 18

def test_extract_pairs
	pairs = @parser.extract_pairs
	assert_equal(487, pairs.size)
#				first = ["47358", "53442"]
     first = ["49817", "56268"]
	assert_equal(first, pairs.first)
#				last = ["52251", "52783"]
     last = ["48808", "52769"]
	assert_equal(last, pairs.last)
end