Class: ODDB::OdbaExporter::TestScLine

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
FlexMock::TestCase
Defined in:
ext/export/test/test_oddbdat.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) test_structure



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'ext/export/test/test_oddbdat.rb', line 483

def test_structure
  package = ODDB::Package.new('12')
  substance = flexmock('substance') do |sub|
    sub.should_receive(:oid).and_return('oid')
  end
  flexstub(Date).should_receive(:"today.strftime").and_return('20110203000000')
  @scline = ScLine.new(package, substance)
  expected = {
    1=>"40",
    2=>"20110203000000",
    3=>"oid",
    4=>"L",
    5=>"4",
    6=>substance,
  }
  assert_equal(expected.sort, @scline.structure.sort)
end