Sha256: fdcb84f953dbb1bce150aa30cf2eb1cfebb6297e699d834e2ca0c9cd791ef371
Contents?: true
Size: 803 Bytes
Versions: 1
Compression:
Stored size: 803 Bytes
Contents
# encoding: utf-8 ### # to run use # ruby -I ./lib -I ./test test/test_match_start_date.rb require 'helper' class TestMatchStart < MiniTest::Test def test_eng txt =<<TXT Matchday 1 [Aug 2] A - B Matchday 2 [Jan 3] A - B Matchday 3 [Aug 4] A - B TXT teams =<<TXT A B TXT SportDb::Import.config.lang = 'en' start = Date.new( 2017, 7, 1 ) parser = SportDb::MatchParser.new( txt, teams, start ) matches, rounds = parser.parse pp rounds pp matches ## only dump last record for now assert_equal Date.new( 2017, 8, 2), matches[0].date assert_equal Date.new( 2018, 1, 3), matches[1].date assert_equal Date.new( 2018, 8, 4), matches[2].date end # method test_end end # class TestMatchStart
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sportdb-formats-1.1.2 | test/test_match_start_date.rb |