Sha256: da79a518fb367bde542a434f352cbdd655dda1243e7e4e2f8c2dd2efbea5feb9
Contents?: true
Size: 1020 Bytes
Versions: 5
Compression:
Stored size: 1020 Bytes
Contents
# encoding: utf-8 ### # to run use # ruby -I ./lib -I ./test test/test_national_teams.rb require 'helper' class TestNationalTeams < MiniTest::Test NATIONAL_TEAMS = SportDb::Import.catalog.national_teams def test_find t = NATIONAL_TEAMS.find( 'AUT' ) assert_equal 'Austria', t.name assert_equal 'aut', t.key assert_equal 'AUT', t.code t = NATIONAL_TEAMS.find( 'England' ) assert_equal 'England', t.name assert_equal 'eng', t.key assert_equal 'ENG', t.code ## note: all dots (.) get always removed t = NATIONAL_TEAMS.find( '...e.n.g.l.a.n.d...' ) assert_equal 'England', t.name assert_equal 'eng', t.key assert_equal 'ENG', t.code ## note: all spaces and dashes (-) get always removed t = NATIONAL_TEAMS.find( '--- e n g l a n d ---' ) assert_equal 'England', t.name assert_equal 'eng', t.key assert_equal 'ENG', t.code end end # class TestNationalTeams
Version data entries
5 entries across 5 versions & 1 rubygems