Class: TestTableLinksWriter

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
test/test_plugin/flockhart.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



209
210
211
212
213
214
215
216
217
# File 'test/test_plugin/flockhart.rb', line 209

def setup
  @writer = ODDB::Interaction::TableLinksWriter.new 
  formatter = ODDB::HtmlFormatter.new(@writer)
  parser = ODDB::HtmlParser.new(formatter)
  target = ODDB::Interaction::FlockhartPlugin::TARGET
  list = ODDB::Interaction::FlockhartPlugin::TABLE
  html = File.read([target, list].join("/"))
  parser.feed(html)
end

- (Object) test_extract_data



218
219
220
221
222
# File 'test/test_plugin/flockhart.rb', line 218

def test_extract_data
  expected = ODDB::Interaction::FlockhartPlugin::LINKS.sort
  @writer.extract_data
  assert_equal(expected, @writer.links.sort)
end