Sha256: 78cc5c81444899a867538f68ac04fc910c2e585be5a46ea2f0b548b5df11c0c4

Contents?: true

Size: 1.04 KB

Versions: 10

Compression:

Stored size: 1.04 KB

Contents

# encoding: utf-8

###
#  to run use
#     ruby -I ./lib -I ./test test/test_match_auto_champs.rb


require 'helper'


class TestMatchAutoChamps < MiniTest::Test

  def test_champs_group
    txt, exp = read_test( 'match_auto/champs_group.txt')

    teams, rounds, groups, round_defs, group_defs = parse_auto_conf( txt, lang: 'en' )

     assert_equal exp['teams'],  teams.deep_stringify_keys
     assert_equal exp['rounds'], rounds.deep_stringify_keys
     assert_equal exp['groups'], groups.deep_stringify_keys

    puts "teams:"
    pp teams
    puts "rounds:"
    pp rounds
    puts "groups:"
    pp groups
    puts "round defs:"
    pp round_defs
    puts "group defs:"
    pp group_defs
  end

  def test_champs_finals
    txt, exp = read_test( 'match_auto/champs_finals.txt')

    teams, rounds = parse_auto_conf( txt, lang: 'en' )

    assert_equal exp['teams'],  teams.deep_stringify_keys
    assert_equal exp['rounds'], rounds.deep_stringify_keys

    pp teams
    pp rounds
  end
end   # class TestMatchAutChamps

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sportdb-formats-1.1.2 test/test_match_auto_champs.rb
sportdb-formats-1.1.1 test/test_match_auto_champs.rb
sportdb-formats-1.1.0 test/test_match_auto_champs.rb
sportdb-formats-1.0.6 test/test_match_auto_champs.rb
sportdb-formats-1.0.5 test/test_match_auto_champs.rb
sportdb-formats-1.0.4 test/test_match_auto_champs.rb
sportdb-formats-1.0.3 test/test_match_auto_champs.rb
sportdb-formats-1.0.2 test/test_match_auto_champs.rb
sportdb-formats-1.0.1 test/test_match_auto_champs.rb
sportdb-formats-1.0.0 test/test_match_auto_champs.rb