test/tc_parse_997.rb in X12-0.0.5 vs test/tc_parse_997.rb in X12-0.1.0

- old
+ new

@@ -22,15 +22,15 @@ #++ # require 'x12' require 'test/unit' -class TestParse < Test::Unit::TestCase +class Test997Parse < Test::Unit::TestCase @@p = nil @@parser = X12::Parser.new('misc/997.d12') - TIMES = 1000 + @@times = 1000 def setup unless @@p @@m997=<<-EOT ST*997*2878~ @@ -128,19 +128,19 @@ assert_equal('', @r.L1000.AK8.TransactionSetIdentifierCode.to_s) end # test_absent def test_timing start = Time::now - TIMES.times do + @@times.times do @r = @@parser.parse('997', @@m997) test_ST test_AK1 test_AK2 test_AK4 test_L1010 test_absent end finish = Time::now - puts "Parses per second: #{TIMES.to_f/(finish-start)}, elapsed: #{finish-start}" + puts "Parses per second, 997: #{@@times.to_f/(finish-start)}, elapsed: #{finish-start}" end # test_timing end # TestList